metanorma-standoc 1.1.0 → 1.1.1

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: ade6c1c0ec2ee0ab99b2442458300ff20d4ff4f54852d27555c12102325bde55
4
- data.tar.gz: 8438c7af3cdb3950dfef74a6834a5110dd6fdb64b8919b491f1e0c3899ced318
3
+ metadata.gz: 51e50247eb8a0979d7d568867bd281252a690b8373f3e05436840cadfb00edd5
4
+ data.tar.gz: 7c00c5489a948885f561b55710399253cd8e0ecc38d1ea12538d07d9459a8c0c
5
5
  SHA512:
6
- metadata.gz: 5d4932ccc12e249099226f62fccfd08e116d362c1b0b045e758325db52fa0f2425ffa8b197d106cd4fcb4d7b28ba8a1fcacaacba5cc69be2391e74ced1b3ecac
7
- data.tar.gz: 8eda800af76b44522d194711cc5272387b8e1c996713db8c54ff1a0dbbad86b229b9cd1feb3139c45cbbfec326d92503eb51fea857c007958588aaf36cc67e2c
6
+ metadata.gz: 34c5e293d54c6c32466722efdfb6f2dfaef4939b03ebf676acaf591f52488516f4a2c95deea3b46c8f8c5870c770904afc3a5ec0c140109c7f3cf5eab9c47a8b
7
+ data.tar.gz: 9779488fe79002cf065a0ccff2802477096175c1d0e166adeb3fb6d92ffbe8a3f97aead0008b93dfd684044877892e876aa5de34ee1e7832a9beddcd836113f4
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- metanorma-standoc (1.1.0)
4
+ metanorma-standoc (1.1.1)
5
5
  asciidoctor (~> 1.5.7)
6
6
  concurrent-ruby
7
7
  iev (~> 0.2.0)
@@ -13,7 +13,7 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- addressable (2.5.2)
16
+ addressable (2.6.0)
17
17
  public_suffix (>= 2.0.2, < 4.0)
18
18
  algoliasearch (1.25.2)
19
19
  httpclient (~> 2.8, >= 2.8.3)
@@ -80,13 +80,13 @@ GEM
80
80
  algoliasearch
81
81
  iecbib (~> 0.2.1)
82
82
  iso-bib-item (~> 0.4.2)
83
- isodoc (0.9.14)
83
+ isodoc (0.9.15)
84
84
  asciimath
85
85
  html2doc (~> 0.8.6)
86
86
  htmlentities (~> 4.3.4)
87
87
  liquid
88
88
  metanorma (~> 0.3.0)
89
- nokogiri
89
+ nokogiri (>= 1)
90
90
  rake (~> 12.0)
91
91
  roman-numerals
92
92
  ruby-xslt
@@ -101,7 +101,7 @@ GEM
101
101
  rb-inotify (~> 0.9, >= 0.9.7)
102
102
  ruby_dep (~> 1.2)
103
103
  lumberjack (1.0.13)
104
- metanorma (0.3.5)
104
+ metanorma (0.3.7)
105
105
  asciidoctor
106
106
  method_source (0.9.2)
107
107
  mime-types (3.2.2)
@@ -115,8 +115,8 @@ GEM
115
115
  nenv (~> 0.1)
116
116
  shellany (~> 0.0)
117
117
  optout (0.0.2)
118
- parallel (1.12.1)
119
- parser (2.5.3.0)
118
+ parallel (1.13.0)
119
+ parser (2.6.0.0)
120
120
  ast (~> 2.4.0)
121
121
  powerpack (0.1.2)
122
122
  pry (0.12.2)
@@ -1,7 +1,7 @@
1
1
  = Metanorma-standoc
2
2
 
3
3
  image:https://img.shields.io/gem/v/metanorma-standoc.svg["Gem Version", link="https://rubygems.org/gems/metanorma-standoc"]
4
- image:https://img.shields.io/travis/riboseinc/metanorma-standoc/master.svg["Build Status", link="https://travis-ci.com/riboseinc/metanorma-standoc"]
4
+ image:https://img.shields.io/travis/riboseinc/metanorma-standoc/master.svg["Build Status", link="https://travis-ci.org/riboseinc/metanorma-standoc"]
5
5
  image:https://codeclimate.com/github/riboseinc/metanorma-standoc/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/riboseinc/metanorma-standoc"]
6
6
 
7
7
  WARNING: This gem is still under development.
@@ -139,7 +139,8 @@ module Asciidoctor
139
139
  id: Utils::anchor_or_uuid,
140
140
  imagetype: types.first.sub_type.upcase,
141
141
  height: node.attr("height") || "auto",
142
- width: node.attr("width") || "auto" }
142
+ width: node.attr("width") || "auto" ,
143
+ alt: node.alt == node.attr("default-alt") ? nil : node.alt }
143
144
  end
144
145
 
145
146
  def figure_title(node, f)
@@ -140,12 +140,12 @@ module Asciidoctor
140
140
  end
141
141
 
142
142
  def metadata_source(node, xml)
143
- node.attr("uri") && xml.source(node.attr("uri"))
144
- node.attr("xml-uri") && xml.source(node.attr("xml-uri"), type: "xml")
145
- node.attr("html-uri") && xml.source(node.attr("html-uri"), type: "html")
146
- node.attr("pdf-uri") && xml.source(node.attr("pdf-uri"), type: "pdf")
147
- node.attr("doc-uri") && xml.source(node.attr("doc-uri"), type: "doc")
148
- node.attr("relaton-uri") && xml.source(node.attr("relaton-uri"), type: "relaton")
143
+ node.attr("uri") && xml.uri(node.attr("uri"))
144
+ node.attr("xml-uri") && xml.uri(node.attr("xml-uri"), type: "xml")
145
+ node.attr("html-uri") && xml.uri(node.attr("html-uri"), type: "html")
146
+ node.attr("pdf-uri") && xml.uri(node.attr("pdf-uri"), type: "pdf")
147
+ node.attr("doc-uri") && xml.uri(node.attr("doc-uri"), type: "doc")
148
+ node.attr("relaton-uri") && xml.uri(node.attr("relaton-uri"), type: "relaton")
149
149
  end
150
150
 
151
151
  def metadata_date1(node, xml, type)
@@ -184,9 +184,9 @@ module Asciidoctor
184
184
  metadata_source(node, xml)
185
185
  metadata_id(node, xml)
186
186
  metadata_date(node, xml)
187
- metadata_version(node, xml)
188
187
  metadata_author(node, xml)
189
188
  metadata_publisher(node, xml)
189
+ metadata_version(node, xml)
190
190
  metadata_language(node, xml)
191
191
  metadata_script(node, xml)
192
192
  metadata_status(node, xml)
@@ -911,6 +911,9 @@
911
911
  </choice>
912
912
  </attribute>
913
913
  </optional>
914
+ <optional>
915
+ <attribute name="alt"/>
916
+ </optional>
914
917
  </element>
915
918
  </define>
916
919
  <define name="stem">
@@ -110,7 +110,7 @@ module Asciidoctor
110
110
  fragment = doc.fragment("")
111
111
  ::Nokogiri::XML::Builder.with fragment, &block
112
112
  fragment.to_xml(encoding: "US-ASCII").lines.map do |l|
113
- l.gsub(/\s*\n/, "")
113
+ l.gsub(/\s*\n/, " ")
114
114
  end
115
115
  end
116
116
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Standoc
3
- VERSION = "1.1.0".freeze
3
+ VERSION = "1.1.1".freeze
4
4
  end
5
5
  end
@@ -279,12 +279,12 @@ RSpec.describe Asciidoctor::Standoc do
279
279
  <bibdata type="article">
280
280
  <title language="en" format="text/plain">Document title</title>
281
281
  <title language="eo" format="text/plain">Dokumenttitolo</title>
282
- <source>A</source>
283
- <source type="xml">B</source>
284
- <source type="html">C</source>
285
- <source type="pdf">D</source>
286
- <source type="doc">E</source>
287
- <source type="relaton">F</source>
282
+ <uri>A</uri>
283
+ <uri type="xml">B</uri>
284
+ <uri type="html">C</uri>
285
+ <uri type="pdf">D</uri>
286
+ <uri type="doc">E</uri>
287
+ <uri type="relaton">F</uri>
288
288
  <docidentifier>1000-1-1</docidentifier>
289
289
  <docnumber>1000</docnumber>
290
290
  <contributor>
@@ -308,14 +308,14 @@ RSpec.describe Asciidoctor::Standoc do
308
308
  expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
309
309
  #{ASCIIDOC_BLANK_HDR}
310
310
  .Split-it-right sample divider
311
- image::spec/examples/rice_images/rice_image1.png[]
311
+ image::spec/examples/rice_images/rice_image1.png[alttext]
312
312
 
313
313
  INPUT
314
314
  #{BLANK_HDR}
315
315
  <sections>
316
316
  <figure id="_">
317
317
  <name>Split-it-right sample divider</name>
318
- <image src="spec/examples/rice_images/rice_image1.png" id="_" imagetype="PNG" height="auto" width="auto"/>
318
+ <image src="spec/examples/rice_images/rice_image1.png" id="_" imagetype="PNG" height="auto" width="auto" alt="alttext"/>
319
319
  </figure>
320
320
  </sections>
321
321
  </standard-document>
@@ -364,7 +364,7 @@ RSpec.describe Asciidoctor::Standoc do
364
364
  INPUT
365
365
  #{BLANK_HDR}
366
366
  <sections>
367
- <p id="_">Hello <image src="spec/examples/rice_images/rice_image1.png" id="_" imagetype="PNG" height="3" width="4"/>, how are you?</p>
367
+ <p id="_">Hello <image src="spec/examples/rice_images/rice_image1.png" id="_" imagetype="PNG" height="3" width="4" alt="alt"/>, how are you?</p>
368
368
  </figure>
369
369
  </sections>
370
370
  </standard-document>
@@ -4,7 +4,8 @@ RSpec.describe Asciidoctor::Standoc do
4
4
  it "processes inline_quoted formatting" do
5
5
  expect(strip_guid(Asciidoctor.convert(<<~"INPUT", backend: :standoc, header_footer: true))).to be_equivalent_to <<~"OUTPUT"
6
6
  #{DUMBQUOTE_BLANK_HDR}
7
- _emphasis_
7
+ _Physical noise
8
+ sources_
8
9
  *strong*
9
10
  `monospace`
10
11
  "double quote"
@@ -23,7 +24,7 @@ RSpec.describe Asciidoctor::Standoc do
23
24
  INPUT
24
25
  #{BLANK_HDR}
25
26
  <sections>
26
- <em>emphasis</em>
27
+ <em>Physical noise sources</em>
27
28
  <strong>strong</strong>
28
29
  <tt>monospace</tt>
29
30
  "double quote"
@@ -14,7 +14,7 @@ RSpec.describe Metanorma::Standoc::Processor do
14
14
 
15
15
  it "registers output formats against metanorma" do
16
16
  expect(processor.output_formats.sort.to_s).to be_equivalent_to <<~"OUTPUT"
17
- [[:doc, "doc"], [:html, "html"], [:xml, "xml"]]
17
+ [[:doc, "doc"], [:html, "html"], [:rxl, "rxl"], [:xml, "xml"]]
18
18
  OUTPUT
19
19
  end
20
20
 
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: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-15 00:00:00.000000000 Z
11
+ date: 2019-01-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor