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 +4 -4
- data/Gemfile.lock +7 -7
- data/README.adoc +1 -1
- data/lib/asciidoctor/standoc/blocks.rb +2 -1
- data/lib/asciidoctor/standoc/front.rb +7 -7
- data/lib/asciidoctor/standoc/isodoc.rng +3 -0
- data/lib/asciidoctor/standoc/utils.rb +1 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/spec/asciidoctor-standoc/base_spec.rb +6 -6
- data/spec/asciidoctor-standoc/blocks_spec.rb +3 -3
- data/spec/asciidoctor-standoc/inline_spec.rb +3 -2
- data/spec/metanorma/processor_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51e50247eb8a0979d7d568867bd281252a690b8373f3e05436840cadfb00edd5
|
4
|
+
data.tar.gz: 7c00c5489a948885f561b55710399253cd8e0ecc38d1ea12538d07d9459a8c0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34c5e293d54c6c32466722efdfb6f2dfaef4939b03ebf676acaf591f52488516f4a2c95deea3b46c8f8c5870c770904afc3a5ec0c140109c7f3cf5eab9c47a8b
|
7
|
+
data.tar.gz: 9779488fe79002cf065a0ccff2802477096175c1d0e166adeb3fb6d92ffbe8a3f97aead0008b93dfd684044877892e876aa5de34ee1e7832a9beddcd836113f4
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metanorma-standoc (1.1.
|
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.
|
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.
|
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.
|
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.
|
119
|
-
parser (2.
|
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)
|
data/README.adoc
CHANGED
@@ -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.
|
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.
|
144
|
-
node.attr("xml-uri") && xml.
|
145
|
-
node.attr("html-uri") && xml.
|
146
|
-
node.attr("pdf-uri") && xml.
|
147
|
-
node.attr("doc-uri") && xml.
|
148
|
-
node.attr("relaton-uri") && xml.
|
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)
|
@@ -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
|
-
<
|
283
|
-
<
|
284
|
-
<
|
285
|
-
<
|
286
|
-
<
|
287
|
-
<
|
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
|
-
|
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
|
-
|
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.
|
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-
|
11
|
+
date: 2019-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|