metanorma-m3d 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eea55d65f6aa596e1a3dc63aec7f0096a50d4992e8fba2837885e8dd08d1c572
4
- data.tar.gz: 9cc10f954832573d6ccb424d5223319d5faf1f1e01e807b2125c46eebb6a75f7
3
+ metadata.gz: 5056c09788ea53275b308cfb538c05ce31ba4d4ee88bf7cb68d91744a7723c9e
4
+ data.tar.gz: 26ea48724ad868a6186c78c478e4900e0ece5e7aea44c214e966b8f81447983a
5
5
  SHA512:
6
- metadata.gz: aa0dfeaf79115cec35344aec9cd3ce72e6391cf2ad83a1301e5186b5feb8766b76202bf2587190f5c7c65f08dee7ef9eaf089678f494870863c0349d6c704f0c
7
- data.tar.gz: fb1ad009eb9102b5c8ea2f90000e43b3b7849396a64652da45728640b60face4baeae887a022cbefbccf1df17883211cf97b9ae891d1bcccfb0fb162c5578711
6
+ metadata.gz: d009e382ab635a00798a378fdee7ffa5e40e66304f5fe7017968d8d9b98049dffeebfbbf2143cdf15eba984d1e202206a442171ba416ee31ef1ae365ce87b05a
7
+ data.tar.gz: 064f51ec0de5e2b2d92a34fea258a61f9662269b576237483e8071942138e6f4bf28a848f66686ca131148a0bde15d8f9a1bc1f2eefcfdccf25ed581428320ce
@@ -15,21 +15,6 @@ module Asciidoctor
15
15
 
16
16
  register_for "m3d"
17
17
 
18
- def metadata(node, xml)
19
- title node, xml
20
- metadata_source(node, xml)
21
- metadata_id(node, xml)
22
- metadata_date(node, xml)
23
- metadata_author(node, xml)
24
- metadata_publisher(node, xml)
25
- xml.language node.attr("language")
26
- xml.script (node.attr("script") || "Latn")
27
- metadata_status(node, xml)
28
- metadata_copyright(node, xml)
29
- metadata_committee(node, xml)
30
- metadata_ics(node, xml)
31
- end
32
-
33
18
  def metadata_author(node, xml)
34
19
  xml.contributor do |c|
35
20
  c.role **{ type: "author" }
@@ -138,15 +123,6 @@ module Asciidoctor
138
123
  File.join(File.dirname(__FILE__), "m3d.rng"))
139
124
  end
140
125
 
141
- def literal(node)
142
- noko do |xml|
143
- xml.figure **id_attr(node) do |f|
144
- figure_title(node, f)
145
- f.pre node.lines.join("\n")
146
- end
147
- end
148
- end
149
-
150
126
  def sections_cleanup(x)
151
127
  super
152
128
  x.xpath("//*[@inline-header]").each do |h|
@@ -169,29 +145,6 @@ module Asciidoctor
169
145
  def pdf_converter(node)
170
146
  IsoDoc::M3d::PdfConvert.new(html_extract_attributes(node))
171
147
  end
172
-
173
- def inline_quoted(node)
174
- noko do |xml|
175
- case node.type
176
- when :emphasis then xml.em node.text
177
- when :strong then xml.strong node.text
178
- when :monospaced then xml.tt node.text
179
- when :double then xml << "\"#{node.text}\""
180
- when :single then xml << "'#{node.text}'"
181
- when :superscript then xml.sup node.text
182
- when :subscript then xml.sub node.text
183
- when :asciimath then stem_parse(node.text, xml)
184
- else
185
- case node.role
186
- when "strike" then xml.strike node.text
187
- when "smallcap" then xml.smallcap node.text
188
- when "keyword" then xml.keyword node.text
189
- else
190
- xml << node.text
191
- end
192
- end
193
- end.join
194
- end
195
148
  end
196
149
  end
197
150
  end
@@ -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/>
@@ -73,28 +73,6 @@
73
73
  </choice>
74
74
  </element>
75
75
  </define>
76
- <!-- TextElement |= keyword -->
77
- <define name="TextElement">
78
- <choice>
79
- <text/>
80
- <ref name="em"/>
81
- <ref name="eref"/>
82
- <ref name="strong"/>
83
- <ref name="stem"/>
84
- <ref name="sub"/>
85
- <ref name="sup"/>
86
- <ref name="tt"/>
87
- <ref name="strike"/>
88
- <ref name="smallcap"/>
89
- <ref name="xref"/>
90
- <ref name="br"/>
91
- <ref name="hyperlink"/>
92
- <ref name="hr"/>
93
- <ref name="pagebreak"/>
94
- <ref name="bookmark"/>
95
- <ref name="keyword"/>
96
- </choice>
97
- </define>
98
76
  <define name="BibItemType" combine="choice">
99
77
  <choice>
100
78
  <value>guidance</value>
@@ -127,16 +105,6 @@
127
105
  <text/>
128
106
  </element>
129
107
  </define>
130
- <define name="pre">
131
- <element name="pre">
132
- <text/>
133
- </element>
134
- </define>
135
- <define name="keyword">
136
- <element name="keyword">
137
- <text/>
138
- </element>
139
- </define>
140
108
  <define name="m3d-standard">
141
109
  <element name="m3d-standard">
142
110
  <ref name="bibdata"/>
@@ -13,10 +13,6 @@ module IsoDoc
13
13
  end
14
14
  end
15
15
 
16
- def pre_parse(node, out)
17
- out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
18
- end
19
-
20
16
  def term_defs_boilerplate(div, source, term, preface)
21
17
  if source.empty? && term.nil?
22
18
  div << @no_terms_boilerplate
@@ -30,18 +26,6 @@ module IsoDoc
30
26
  @annex_lbl = "Appendix"
31
27
  end
32
28
 
33
- def error_parse(node, out)
34
- # catch elements not defined in ISO
35
- case node.name
36
- when "pre"
37
- pre_parse(node, out)
38
- when "keyword"
39
- out.span node.text, **{ class: "keyword" }
40
- else
41
- super
42
- end
43
- end
44
-
45
29
  def fileloc(loc)
46
30
  File.join(File.dirname(__FILE__), loc)
47
31
  end
@@ -13,10 +13,6 @@ module IsoDoc
13
13
  end
14
14
  end
15
15
 
16
- def pre_parse(node, out)
17
- out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
18
- end
19
-
20
16
  def term_defs_boilerplate(div, source, term, preface)
21
17
  if source.empty? && term.nil?
22
18
  div << @no_terms_boilerplate
@@ -30,18 +26,6 @@ module IsoDoc
30
26
  @annex_lbl = "Appendix"
31
27
  end
32
28
 
33
- def error_parse(node, out)
34
- # catch elements not defined in ISO
35
- case node.name
36
- when "pre"
37
- pre_parse(node, out)
38
- when "keyword"
39
- out.span node.text, **{ class: "keyword" }
40
- else
41
- super
42
- end
43
- end
44
-
45
29
  def fileloc(loc)
46
30
  File.join(File.dirname(__FILE__), loc)
47
31
  end
@@ -13,10 +13,6 @@ module IsoDoc
13
13
  end
14
14
  end
15
15
 
16
- def pre_parse(node, out)
17
- out.pre node.text # content.gsub(/</, "&lt;").gsub(/>/, "&gt;")
18
- end
19
-
20
16
  def term_defs_boilerplate(div, source, term, preface)
21
17
  if source.empty? && term.nil?
22
18
  div << @no_terms_boilerplate
@@ -30,18 +26,6 @@ module IsoDoc
30
26
  @annex_lbl = "Appendix"
31
27
  end
32
28
 
33
- def error_parse(node, out)
34
- # catch elements not defined in ISO
35
- case node.name
36
- when "pre"
37
- pre_parse(node, out)
38
- when "keyword"
39
- out.span node.text, **{ class: "keyword" }
40
- else
41
- super
42
- end
43
- end
44
-
45
29
  def fileloc(loc)
46
30
  File.join(File.dirname(__FILE__), loc)
47
31
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module M3d
3
- VERSION = "1.0.10"
3
+ VERSION = "1.0.11"
4
4
  end
5
5
  end
@@ -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", "~> 0.50"
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", "~> 0.3.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-m3d
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.10
4
+ version: 1.0.11
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-27 00:00:00.000000000 Z
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: '0.50'
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: '0.50'
292
+ version: 0.54.0
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: simplecov
295
295
  requirement: !ruby/object:Gem::Requirement