metanorma-csand 1.0.9 → 1.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/csand/converter.rb +0 -33
- data/lib/asciidoctor/csand/csand.rng +177 -44
- data/lib/asciidoctor/csand/isodoc.rng +22 -0
- data/lib/isodoc/csand/html_convert.rb +0 -16
- data/lib/metanorma/csand/version.rb +1 -1
- data/metanorma-csand.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18498d7fede800364ea593d261ca1a6f59f6840e1ed2ee12d0a3ff57a11bf40d
|
4
|
+
data.tar.gz: 44f126444ee80c3dd7a7ddead147b8ff5cd536b141677018a7658815834facf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d528ba0f84b160bb03369ed32809e05bb51d336dd469ad5c2fc7ce89ed6695c5784d44e03f399175256678f7101d2a7f9b0130534c66ae0cb50b90e300c7e6c0
|
7
|
+
data.tar.gz: 721823371670809de22c7cc3c24ed98a850f3501be5ae9ad7813f989070aadeced7370961ab9c57341a2976e6d31d54dd47a6f101c85cfad6f2808548e47b1fd
|
@@ -120,15 +120,6 @@ module Asciidoctor
|
|
120
120
|
File.join(File.dirname(__FILE__), "csand.rng"))
|
121
121
|
end
|
122
122
|
|
123
|
-
def literal(node)
|
124
|
-
noko do |xml|
|
125
|
-
xml.figure **id_attr(node) do |f|
|
126
|
-
figure_title(node, f)
|
127
|
-
f.pre node.lines.join("\n")
|
128
|
-
end
|
129
|
-
end
|
130
|
-
end
|
131
|
-
|
132
123
|
def sections_cleanup(x)
|
133
124
|
super
|
134
125
|
x.xpath("//*[@inline-header]").each do |h|
|
@@ -143,30 +134,6 @@ module Asciidoctor
|
|
143
134
|
def html_converter(node)
|
144
135
|
IsoDoc::Csand::HtmlConvert.new(html_extract_attributes(node))
|
145
136
|
end
|
146
|
-
|
147
|
-
def inline_quoted(node)
|
148
|
-
noko do |xml|
|
149
|
-
case node.type
|
150
|
-
when :emphasis then xml.em node.text
|
151
|
-
when :strong then xml.strong node.text
|
152
|
-
when :monospaced then xml.tt node.text
|
153
|
-
when :double then xml << "\"#{node.text}\""
|
154
|
-
when :single then xml << "'#{node.text}'"
|
155
|
-
when :superscript then xml.sup node.text
|
156
|
-
when :subscript then xml.sub node.text
|
157
|
-
when :asciimath then stem_parse(node.text, xml)
|
158
|
-
else
|
159
|
-
case node.role
|
160
|
-
when "strike" then xml.strike node.text
|
161
|
-
when "smallcap" then xml.smallcap node.text
|
162
|
-
when "keyword" then xml.keyword node.text
|
163
|
-
else
|
164
|
-
xml << node.text
|
165
|
-
end
|
166
|
-
end
|
167
|
-
end.join
|
168
|
-
end
|
169
|
-
|
170
137
|
end
|
171
138
|
end
|
172
139
|
end
|
@@ -16,6 +16,9 @@
|
|
16
16
|
</define>
|
17
17
|
<define name="docidentifier">
|
18
18
|
<element name="docidentifier">
|
19
|
+
<optional>
|
20
|
+
<attribute name="type"/>
|
21
|
+
</optional>
|
19
22
|
<text/>
|
20
23
|
</element>
|
21
24
|
</define>
|
@@ -70,28 +73,6 @@
|
|
70
73
|
</choice>
|
71
74
|
</element>
|
72
75
|
</define>
|
73
|
-
<!-- TextElement |= keyword -->
|
74
|
-
<define name="TextElement">
|
75
|
-
<choice>
|
76
|
-
<text/>
|
77
|
-
<ref name="em"/>
|
78
|
-
<ref name="eref"/>
|
79
|
-
<ref name="strong"/>
|
80
|
-
<ref name="stem"/>
|
81
|
-
<ref name="sub"/>
|
82
|
-
<ref name="sup"/>
|
83
|
-
<ref name="tt"/>
|
84
|
-
<ref name="strike"/>
|
85
|
-
<ref name="smallcap"/>
|
86
|
-
<ref name="xref"/>
|
87
|
-
<ref name="br"/>
|
88
|
-
<ref name="hyperlink"/>
|
89
|
-
<ref name="hr"/>
|
90
|
-
<ref name="pagebreak"/>
|
91
|
-
<ref name="bookmark"/>
|
92
|
-
<ref name="keyword"/>
|
93
|
-
</choice>
|
94
|
-
</define>
|
95
76
|
<define name="BibItemType" combine="choice">
|
96
77
|
<choice>
|
97
78
|
<value>guidance</value>
|
@@ -105,33 +86,185 @@
|
|
105
86
|
<value>case-study</value>
|
106
87
|
</choice>
|
107
88
|
</define>
|
89
|
+
<define name="BibliographicItem">
|
90
|
+
<optional>
|
91
|
+
<attribute name="type">
|
92
|
+
<ref name="BibItemType"/>
|
93
|
+
</attribute>
|
94
|
+
</optional>
|
95
|
+
<optional>
|
96
|
+
<ref name="fetched"/>
|
97
|
+
</optional>
|
98
|
+
<choice>
|
99
|
+
<oneOrMore>
|
100
|
+
<ref name="btitle"/>
|
101
|
+
</oneOrMore>
|
102
|
+
<ref name="formattedref"/>
|
103
|
+
</choice>
|
104
|
+
<zeroOrMore>
|
105
|
+
<ref name="bsource"/>
|
106
|
+
</zeroOrMore>
|
107
|
+
<zeroOrMore>
|
108
|
+
<ref name="docidentifier"/>
|
109
|
+
</zeroOrMore>
|
110
|
+
<optional>
|
111
|
+
<ref name="docnumber"/>
|
112
|
+
</optional>
|
113
|
+
<zeroOrMore>
|
114
|
+
<ref name="bdate"/>
|
115
|
+
</zeroOrMore>
|
116
|
+
<zeroOrMore>
|
117
|
+
<ref name="contributor"/>
|
118
|
+
</zeroOrMore>
|
119
|
+
<optional>
|
120
|
+
<ref name="edition"/>
|
121
|
+
</optional>
|
122
|
+
<zeroOrMore>
|
123
|
+
<ref name="biblionote"/>
|
124
|
+
</zeroOrMore>
|
125
|
+
<zeroOrMore>
|
126
|
+
<ref name="language"/>
|
127
|
+
</zeroOrMore>
|
128
|
+
<zeroOrMore>
|
129
|
+
<ref name="script"/>
|
130
|
+
</zeroOrMore>
|
131
|
+
<zeroOrMore>
|
132
|
+
<ref name="abstract"/>
|
133
|
+
</zeroOrMore>
|
134
|
+
<optional>
|
135
|
+
<ref name="status"/>
|
136
|
+
</optional>
|
137
|
+
<optional>
|
138
|
+
<ref name="copyright"/>
|
139
|
+
</optional>
|
140
|
+
<zeroOrMore>
|
141
|
+
<ref name="docrelation"/>
|
142
|
+
</zeroOrMore>
|
143
|
+
<zeroOrMore>
|
144
|
+
<ref name="series"/>
|
145
|
+
</zeroOrMore>
|
146
|
+
<optional>
|
147
|
+
<ref name="medium"/>
|
148
|
+
</optional>
|
149
|
+
<zeroOrMore>
|
150
|
+
<ref name="bplace"/>
|
151
|
+
</zeroOrMore>
|
152
|
+
<zeroOrMore>
|
153
|
+
<ref name="extent"/>
|
154
|
+
</zeroOrMore>
|
155
|
+
<zeroOrMore>
|
156
|
+
<ref name="accesslocation"/>
|
157
|
+
</zeroOrMore>
|
158
|
+
<optional>
|
159
|
+
<ref name="bclassification"/>
|
160
|
+
</optional>
|
161
|
+
<optional>
|
162
|
+
<ref name="validity"/>
|
163
|
+
</optional>
|
164
|
+
<optional>
|
165
|
+
<ref name="editorialgroup"/>
|
166
|
+
</optional>
|
167
|
+
<zeroOrMore>
|
168
|
+
<ref name="ics"/>
|
169
|
+
</zeroOrMore>
|
170
|
+
<optional>
|
171
|
+
<ref name="allParts"/>
|
172
|
+
</optional>
|
173
|
+
</define>
|
174
|
+
<define name="BibData">
|
175
|
+
<optional>
|
176
|
+
<attribute name="type">
|
177
|
+
<ref name="BibItemType"/>
|
178
|
+
</attribute>
|
179
|
+
</optional>
|
180
|
+
<oneOrMore>
|
181
|
+
<ref name="btitle"/>
|
182
|
+
</oneOrMore>
|
183
|
+
<optional>
|
184
|
+
<ref name="formattedref"/>
|
185
|
+
</optional>
|
186
|
+
<zeroOrMore>
|
187
|
+
<ref name="bsource"/>
|
188
|
+
</zeroOrMore>
|
189
|
+
<zeroOrMore>
|
190
|
+
<ref name="docidentifier"/>
|
191
|
+
</zeroOrMore>
|
192
|
+
<optional>
|
193
|
+
<ref name="docnumber"/>
|
194
|
+
</optional>
|
195
|
+
<zeroOrMore>
|
196
|
+
<ref name="bdate"/>
|
197
|
+
</zeroOrMore>
|
198
|
+
<zeroOrMore>
|
199
|
+
<ref name="contributor"/>
|
200
|
+
</zeroOrMore>
|
201
|
+
<optional>
|
202
|
+
<ref name="edition"/>
|
203
|
+
</optional>
|
204
|
+
<zeroOrMore>
|
205
|
+
<ref name="biblionote"/>
|
206
|
+
</zeroOrMore>
|
207
|
+
<zeroOrMore>
|
208
|
+
<ref name="language"/>
|
209
|
+
</zeroOrMore>
|
210
|
+
<zeroOrMore>
|
211
|
+
<ref name="script"/>
|
212
|
+
</zeroOrMore>
|
213
|
+
<zeroOrMore>
|
214
|
+
<ref name="abstract"/>
|
215
|
+
</zeroOrMore>
|
216
|
+
<optional>
|
217
|
+
<ref name="status"/>
|
218
|
+
</optional>
|
219
|
+
<ref name="copyright"/>
|
220
|
+
<zeroOrMore>
|
221
|
+
<ref name="docrelation"/>
|
222
|
+
</zeroOrMore>
|
223
|
+
<zeroOrMore>
|
224
|
+
<ref name="series"/>
|
225
|
+
</zeroOrMore>
|
226
|
+
<optional>
|
227
|
+
<ref name="medium"/>
|
228
|
+
</optional>
|
229
|
+
<zeroOrMore>
|
230
|
+
<ref name="bplace"/>
|
231
|
+
</zeroOrMore>
|
232
|
+
<zeroOrMore>
|
233
|
+
<ref name="extent"/>
|
234
|
+
</zeroOrMore>
|
235
|
+
<zeroOrMore>
|
236
|
+
<ref name="accesslocation"/>
|
237
|
+
</zeroOrMore>
|
238
|
+
<optional>
|
239
|
+
<ref name="bclassification"/>
|
240
|
+
</optional>
|
241
|
+
<optional>
|
242
|
+
<ref name="validity"/>
|
243
|
+
</optional>
|
244
|
+
<ref name="editorialgroup"/>
|
245
|
+
<zeroOrMore>
|
246
|
+
<ref name="ics"/>
|
247
|
+
</zeroOrMore>
|
248
|
+
<optional>
|
249
|
+
<ref name="allParts"/>
|
250
|
+
</optional>
|
251
|
+
</define>
|
108
252
|
<define name="editorialgroup">
|
109
253
|
<element name="editorialgroup">
|
110
|
-
<
|
254
|
+
<oneOrMore>
|
255
|
+
<ref name="technical-committee"/>
|
256
|
+
</oneOrMore>
|
257
|
+
</element>
|
258
|
+
</define>
|
259
|
+
<define name="technical-committee">
|
260
|
+
<element name="committee">
|
261
|
+
<optional>
|
262
|
+
<attribute name="type"/>
|
263
|
+
</optional>
|
264
|
+
<text/>
|
111
265
|
</element>
|
112
266
|
</define>
|
113
267
|
</include>
|
114
|
-
<define name="committee">
|
115
|
-
<element name="committee">
|
116
|
-
<attribute name="type">
|
117
|
-
<choice>
|
118
|
-
<value>technical</value>
|
119
|
-
<value>provisional</value>
|
120
|
-
</choice>
|
121
|
-
</attribute>
|
122
|
-
<text/>
|
123
|
-
</element>
|
124
|
-
</define>
|
125
|
-
<define name="pre">
|
126
|
-
<element name="pre">
|
127
|
-
<text/>
|
128
|
-
</element>
|
129
|
-
</define>
|
130
|
-
<define name="keyword">
|
131
|
-
<element name="keyword">
|
132
|
-
<text/>
|
133
|
-
</element>
|
134
|
-
</define>
|
135
268
|
<define name="csand-standard">
|
136
269
|
<element name="csand-standard">
|
137
270
|
<ref name="bibdata"/>
|
@@ -384,6 +384,7 @@
|
|
384
384
|
<ref name="sourcecode"/>
|
385
385
|
<ref name="example"/>
|
386
386
|
<ref name="review"/>
|
387
|
+
<ref name="pre"/>
|
387
388
|
</choice>
|
388
389
|
</define>
|
389
390
|
<define name="paragraph">
|
@@ -540,6 +541,20 @@
|
|
540
541
|
</zeroOrMore>
|
541
542
|
</element>
|
542
543
|
</define>
|
544
|
+
<define name="pre">
|
545
|
+
<element name="pre">
|
546
|
+
<attribute name="id">
|
547
|
+
<data type="ID"/>
|
548
|
+
</attribute>
|
549
|
+
<optional>
|
550
|
+
<ref name="tname"/>
|
551
|
+
</optional>
|
552
|
+
<text/>
|
553
|
+
<zeroOrMore>
|
554
|
+
<ref name="note"/>
|
555
|
+
</zeroOrMore>
|
556
|
+
</element>
|
557
|
+
</define>
|
543
558
|
<define name="table">
|
544
559
|
<element name="table">
|
545
560
|
<attribute name="id">
|
@@ -710,6 +725,7 @@
|
|
710
725
|
</optional>
|
711
726
|
<choice>
|
712
727
|
<ref name="image"/>
|
728
|
+
<ref name="pre"/>
|
713
729
|
<zeroOrMore>
|
714
730
|
<ref name="figure"/>
|
715
731
|
</zeroOrMore>
|
@@ -735,6 +751,7 @@
|
|
735
751
|
<ref name="sub"/>
|
736
752
|
<ref name="sup"/>
|
737
753
|
<ref name="tt"/>
|
754
|
+
<ref name="keyword"/>
|
738
755
|
<ref name="strike"/>
|
739
756
|
<ref name="smallcap"/>
|
740
757
|
<ref name="xref"/>
|
@@ -765,6 +782,11 @@
|
|
765
782
|
<text/>
|
766
783
|
</element>
|
767
784
|
</define>
|
785
|
+
<define name="keyword">
|
786
|
+
<element name="keyword">
|
787
|
+
<text/>
|
788
|
+
</element>
|
789
|
+
</define>
|
768
790
|
<define name="sub">
|
769
791
|
<element name="sub">
|
770
792
|
<text/>
|
@@ -42,10 +42,6 @@ module IsoDoc
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
def pre_parse(node, out)
|
46
|
-
out.pre node.text # content.gsub(/</, "<").gsub(/>/, ">")
|
47
|
-
end
|
48
|
-
|
49
45
|
def term_defs_boilerplate(div, source, term, preface)
|
50
46
|
if source.empty? && term.nil?
|
51
47
|
div << @no_terms_boilerplate
|
@@ -59,18 +55,6 @@ module IsoDoc
|
|
59
55
|
@annex_lbl = "Appendix"
|
60
56
|
end
|
61
57
|
|
62
|
-
def error_parse(node, out)
|
63
|
-
# catch elements not defined in ISO
|
64
|
-
case node.name
|
65
|
-
when "pre"
|
66
|
-
pre_parse(node, out)
|
67
|
-
when "keyword"
|
68
|
-
out.span node.text, **{ class: "keyword" }
|
69
|
-
else
|
70
|
-
super
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
58
|
def html_head()
|
75
59
|
<<~HEAD.freeze
|
76
60
|
<title>{{ doctitle }}</title>
|
data/metanorma-csand.gemspec
CHANGED
@@ -48,7 +48,7 @@ Gem::Specification.new do |spec|
|
|
48
48
|
spec.add_development_dependency "guard-rspec", "~> 4.7"
|
49
49
|
spec.add_development_dependency "rake", "~> 12.0"
|
50
50
|
spec.add_development_dependency "rspec", "~> 3.6"
|
51
|
-
spec.add_development_dependency "rubocop", "
|
51
|
+
spec.add_development_dependency "rubocop", "= 0.54.0"
|
52
52
|
spec.add_development_dependency "simplecov", "~> 0.15"
|
53
53
|
spec.add_development_dependency "timecop", "~> 0.9"
|
54
54
|
spec.add_development_dependency "metanorma"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csand
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11
|
11
|
+
date: 2018-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -280,16 +280,16 @@ dependencies:
|
|
280
280
|
name: rubocop
|
281
281
|
requirement: !ruby/object:Gem::Requirement
|
282
282
|
requirements:
|
283
|
-
- -
|
283
|
+
- - '='
|
284
284
|
- !ruby/object:Gem::Version
|
285
|
-
version:
|
285
|
+
version: 0.54.0
|
286
286
|
type: :development
|
287
287
|
prerelease: false
|
288
288
|
version_requirements: !ruby/object:Gem::Requirement
|
289
289
|
requirements:
|
290
|
-
- -
|
290
|
+
- - '='
|
291
291
|
- !ruby/object:Gem::Version
|
292
|
-
version:
|
292
|
+
version: 0.54.0
|
293
293
|
- !ruby/object:Gem::Dependency
|
294
294
|
name: simplecov
|
295
295
|
requirement: !ruby/object:Gem::Requirement
|