metanorma-standoc 2.10.0 → 2.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/lib/metanorma/standoc/biblio.rng +13 -1
- data/lib/metanorma/standoc/cleanup_text.rb +23 -0
- data/lib/metanorma/standoc/isodoc.rng +6 -6
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d72c6ed69fa0ccc28a28c17306eee42d5a79512aac74e88fac810415ebed8744
|
4
|
+
data.tar.gz: 7f965dc03a094785be980450a1c5370de9d43ddbae30c805ca65669911d0dc69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49896c1fd5521c1065a6a789baf7008a312bc1706772aff2b9938621d97185d77f4f8cd24d13c7b50554549e33b1f04c7b3a12364548d2fd6994431b12c967b4
|
7
|
+
data.tar.gz: 95e3c3de4fc714b04ebf54e24d2ae1c4d24cfafd9f9e3fb5795a5be8c5b86b302c6f2025d55eba42634666239faaa4cb863ad307eff14300765e8c096c00cc49
|
data/Gemfile
CHANGED
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
|
|
1783
1783
|
May be used to differentiate rendering of notes in bibliographies</a:documentation>
|
1784
1784
|
</attribute>
|
1785
1785
|
</optional>
|
1786
|
-
<ref name="
|
1786
|
+
<ref name="LocalizedStringAttributes">
|
1787
1787
|
<a:documentation>The content of the note</a:documentation>
|
1788
1788
|
</ref>
|
1789
|
+
<choice>
|
1790
|
+
<oneOrMore>
|
1791
|
+
<ref name="BasicBlockNoId">
|
1792
|
+
<a:documentation>Multiple blocks of content</a:documentation>
|
1793
|
+
</ref>
|
1794
|
+
</oneOrMore>
|
1795
|
+
<oneOrMore>
|
1796
|
+
<ref name="TextElement">
|
1797
|
+
<a:documentation>Single block of content</a:documentation>
|
1798
|
+
</ref>
|
1799
|
+
</oneOrMore>
|
1800
|
+
</choice>
|
1789
1801
|
</element>
|
1790
1802
|
</define>
|
1791
1803
|
<define name="bibabstract">
|
@@ -88,6 +88,15 @@ module Metanorma
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
# "abc<tag/>", def => "abc",<tag/> def
|
92
|
+
# TODO?
|
93
|
+
def uninterrupt_quotes_around_xml1(xmldoc)
|
94
|
+
xmldoc.xpath("//text()[preceding-sibling::*[1]]").each do |n|
|
95
|
+
uninterrupt_quotes_around_xml_skip(n) and next
|
96
|
+
uninterrupt_quotes_around_xml1(n.previous)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
91
100
|
IGNORE_QUOTES_ELEMENTS =
|
92
101
|
%w(pre tt sourcecode stem asciimath figure bibdata passthrough
|
93
102
|
identifier metanorma-extension).freeze
|
@@ -157,6 +166,20 @@ module Metanorma
|
|
157
166
|
end
|
158
167
|
end
|
159
168
|
|
169
|
+
def dumb2smart_quotesx(xmldoc)
|
170
|
+
# TODO?>
|
171
|
+
prev = ""
|
172
|
+
xmldoc.xpath("//* | //text()").each do |x|
|
173
|
+
x.is_a?(Nokogiri::XML::Node) or next
|
174
|
+
block?(x) and prev = ""
|
175
|
+
empty_tag_with_text_content?(x) and prev = "dummy"
|
176
|
+
x.text? or next
|
177
|
+
ancestor_include?(x, IGNORE_QUOTES_ELEMENTS) and next
|
178
|
+
dumb2smart_quotes1(x, prev)
|
179
|
+
prev = x.text
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
160
183
|
def dumb2smart_quotes1(curr, prev)
|
161
184
|
/[-'"(<>]|\.\.|\dx/.match?(curr.text) or return
|
162
185
|
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.4.
|
20
|
+
<!-- VERSION v1.4.1 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
|
|
326
326
|
<a:documentation>Content of note</a:documentation>
|
327
327
|
<oneOrMore>
|
328
328
|
<choice>
|
329
|
-
<ref name="paragraph"/>
|
329
|
+
<ref name="paragraph-with-footnote"/>
|
330
330
|
<ref name="ul"/>
|
331
331
|
<ref name="ol"/>
|
332
332
|
<ref name="dl"/>
|
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
|
|
412
412
|
<element name="note">
|
413
413
|
<ref name="OptionalId"/>
|
414
414
|
<oneOrMore>
|
415
|
-
<ref name="paragraph"/>
|
415
|
+
<ref name="paragraph-with-footnote"/>
|
416
416
|
</oneOrMore>
|
417
417
|
</element>
|
418
418
|
</define>
|
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
|
|
1977
1977
|
<oneOrMore>
|
1978
1978
|
<choice>
|
1979
1979
|
<a:documentation>Content of the verbal representation of the term</a:documentation>
|
1980
|
-
<ref name="paragraph"/>
|
1980
|
+
<ref name="paragraph-with-footnote"/>
|
1981
1981
|
<ref name="dl"/>
|
1982
1982
|
<ref name="ol"/>
|
1983
1983
|
<ref name="ul"/>
|
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
|
|
2015
2015
|
<oneOrMore>
|
2016
2016
|
<choice>
|
2017
2017
|
<a:documentation>Content of the term note</a:documentation>
|
2018
|
-
<ref name="paragraph"/>
|
2018
|
+
<ref name="paragraph-with-footnote"/>
|
2019
2019
|
<ref name="ul"/>
|
2020
2020
|
<ref name="ol"/>
|
2021
2021
|
<ref name="dl"/>
|
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
|
|
2037
2037
|
<ref name="dl"/>
|
2038
2038
|
<ref name="quote"/>
|
2039
2039
|
<ref name="sourcecode"/>
|
2040
|
-
<ref name="paragraph"/>
|
2040
|
+
<ref name="paragraph-with-footnote"/>
|
2041
2041
|
<ref name="figure"/>
|
2042
2042
|
</choice>
|
2043
2043
|
</oneOrMore>
|
data/metanorma-standoc.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency "asciidoctor", "~> 2.0.0"
|
33
33
|
spec.add_dependency "crass", "~> 1.0.0"
|
34
34
|
spec.add_dependency "iev", "~> 0.3.0"
|
35
|
-
spec.add_dependency "isodoc", "~> 2.12.
|
35
|
+
spec.add_dependency "isodoc", "~> 2.12.4"
|
36
36
|
spec.add_dependency "metanorma", ">= 1.6.0"
|
37
37
|
spec.add_dependency "metanorma-plugin-datastruct", "~> 0.3.0"
|
38
38
|
spec.add_dependency "metanorma-plugin-glossarist", "~> 0.2.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-standoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 2.12.
|
75
|
+
version: 2.12.4
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 2.12.
|
82
|
+
version: 2.12.4
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: metanorma
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|