metanorma-standoc 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +9 -7
- data/README.adoc +11 -2
- data/lib/asciidoctor/standoc/front.rb +1 -0
- data/lib/asciidoctor/standoc/inline.rb +2 -1
- data/lib/metanorma/standoc/version.rb +1 -1
- data/metanorma-standoc.gemspec +2 -1
- data/spec/asciidoctor-standoc/inline_spec.rb +5 -1
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2d24163148b41a8a3c621702cdb69448ccf743108e18ce07e65998a22636104
|
4
|
+
data.tar.gz: def7d200d381364df0276e4c00870e9871ff95b6e85c508886b71053a3ef015b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13ea1f25bdf8b753740c247f9bfb5613d00690243db0a903d3988bd1d80f20978b9c702cb4212ac83903b00a09e4fbba447d65931cb6255f3b729a7984e51ade
|
7
|
+
data.tar.gz: 2d18df9ae5a96c50bcd5fdea904d1a79aece6c8440d3e7a69e944b68431f69c7b33723a84d7920366806164063cdc7f627592e6ea07e1dda680dc951842b1a3e
|
data/Gemfile.lock
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
metanorma-standoc (1.0.
|
4
|
+
metanorma-standoc (1.0.11)
|
5
5
|
asciidoctor (~> 1.5.7)
|
6
|
+
concurrent-ruby
|
6
7
|
iev (~> 0.2.0)
|
7
8
|
isodoc (~> 0.9.0)
|
8
|
-
relaton (~> 0.3.
|
9
|
+
relaton (~> 0.3.1)
|
9
10
|
ruby-jing
|
10
11
|
sterile
|
11
12
|
|
@@ -23,6 +24,7 @@ GEM
|
|
23
24
|
byebug (10.0.2)
|
24
25
|
cnccs (0.1.3)
|
25
26
|
coderay (1.1.2)
|
27
|
+
concurrent-ruby (1.1.3)
|
26
28
|
crack (0.4.3)
|
27
29
|
safe_yaml (~> 1.0.0)
|
28
30
|
diff-lcs (1.3)
|
@@ -32,7 +34,7 @@ GEM
|
|
32
34
|
ffi (1.9.25)
|
33
35
|
formatador (0.2.5)
|
34
36
|
gb-agencies (0.0.5)
|
35
|
-
gbbib (0.4.
|
37
|
+
gbbib (0.4.2)
|
36
38
|
cnccs (~> 0.1.1)
|
37
39
|
gb-agencies (~> 0.0.1)
|
38
40
|
iso-bib-item (~> 0.4.2)
|
@@ -70,7 +72,7 @@ GEM
|
|
70
72
|
iev (0.2.0)
|
71
73
|
nokogiri
|
72
74
|
image_size (2.0.0)
|
73
|
-
iso-bib-item (0.4.
|
75
|
+
iso-bib-item (0.4.4)
|
74
76
|
isoics (~> 0.1.6)
|
75
77
|
nokogiri (~> 1.8.4)
|
76
78
|
ruby_deep_clone (~> 0.8.0)
|
@@ -78,7 +80,7 @@ GEM
|
|
78
80
|
algoliasearch
|
79
81
|
iecbib (~> 0.2.1)
|
80
82
|
iso-bib-item (~> 0.4.2)
|
81
|
-
isodoc (0.9.
|
83
|
+
isodoc (0.9.11)
|
82
84
|
asciimath
|
83
85
|
html2doc (~> 0.8.6)
|
84
86
|
htmlentities (~> 4.3.4)
|
@@ -100,7 +102,7 @@ GEM
|
|
100
102
|
rb-inotify (~> 0.9, >= 0.9.7)
|
101
103
|
ruby_dep (~> 1.2)
|
102
104
|
lumberjack (1.0.13)
|
103
|
-
metanorma (0.3.
|
105
|
+
metanorma (0.3.2)
|
104
106
|
method_source (0.9.2)
|
105
107
|
mime-types (3.2.2)
|
106
108
|
mime-types-data (~> 3.2015)
|
@@ -126,7 +128,7 @@ GEM
|
|
126
128
|
rb-fsevent (0.10.3)
|
127
129
|
rb-inotify (0.9.10)
|
128
130
|
ffi (>= 0.5.0, < 2)
|
129
|
-
relaton (0.3.
|
131
|
+
relaton (0.3.1)
|
130
132
|
algoliasearch
|
131
133
|
gbbib (~> 0.4.0)
|
132
134
|
iecbib (~> 0.2.0)
|
data/README.adoc
CHANGED
@@ -373,6 +373,16 @@ The following terms have non-normative effect, and should be ignored by the amet
|
|
373
373
|
metrical foot consisting of a short, a long, and a short
|
374
374
|
--
|
375
375
|
|
376
|
+
=== Cross-references to external documents
|
377
|
+
|
378
|
+
Metanorma Asciidoctor, like normal Asciidoctor, will process cross-references to
|
379
|
+
anchors within external documents. So `<<document1.adoc#b>>` will be processed as a link
|
380
|
+
to anchor `#b` in document `document1.adoc`. The `.adoc` suffix is presupposed for
|
381
|
+
Asciidoctor documents (as in normal Asciidoctor): it is stripped in Metanorma XML,
|
382
|
+
and substituted with the extension of the current document type when rendered. So
|
383
|
+
`<<document1.adoc#b>>` is rendered in Metanorma XML as `<xref target="document1#b">`,
|
384
|
+
in HTML as `<a href="document1.html#b">`, and in PDF as `<a href="document1.pdf#b">`.
|
385
|
+
|
376
386
|
=== Sections embedded more than 5 levels
|
377
387
|
|
378
388
|
Asciidoctor permits only 5 levels of section embedding (not counting the document title).
|
@@ -494,8 +504,6 @@ In addition, if any entries in Terms and Definitions cite the International Elec
|
|
494
504
|
the http://www.electropedia.org[IEV Electropedia] termbank is queried during validation, to confirm
|
495
505
|
that the cited entries are the same as what is cited online; those queries are routed through the `iev` gem
|
496
506
|
|
497
|
-
TODO: update
|
498
|
-
|
499
507
|
[[cache]]
|
500
508
|
The results of all `relaton` searches done to date, across all documents,
|
501
509
|
are cached in the global cache file `~/.relaton/cache`,
|
@@ -523,6 +531,7 @@ in the global cache fule `~/iev.pstore`, and the results of all `iev` searches
|
|
523
531
|
done to date for the current document are stored in the same directory as the
|
524
532
|
current document, in the file `(filename).iev.pstore`.
|
525
533
|
|
534
|
+
[[docattributes]]
|
526
535
|
== Document Attributes
|
527
536
|
|
528
537
|
The gem relies on Asciidoctor document attributes to provide necessary
|
@@ -31,7 +31,7 @@ module Asciidoctor
|
|
31
31
|
matched = /^fn(:\s*(?<text>.*))?$/.match node.text
|
32
32
|
f = matched.nil? ? "inline" : "footnote"
|
33
33
|
c = matched.nil? ? node.text : matched[:text]
|
34
|
-
t = node.target.gsub(/^#/, "").gsub(%r{(
|
34
|
+
t = node.target.gsub(/^#/, "").gsub(%r{(\.xml|\.adoc)(#.*$)}, "\\2")
|
35
35
|
noko do |xml|
|
36
36
|
xml.xref **attr_code(target: t, type: f) do |x|
|
37
37
|
x << c
|
@@ -124,6 +124,7 @@ module Asciidoctor
|
|
124
124
|
|
125
125
|
when "strike" then xml.strike node.text
|
126
126
|
when "smallcap" then xml.smallcap node.text
|
127
|
+
when "keyword" then xml.keyword node.text
|
127
128
|
else
|
128
129
|
xml << node.text
|
129
130
|
end
|
data/metanorma-standoc.gemspec
CHANGED
@@ -30,8 +30,9 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_dependency "ruby-jing"
|
31
31
|
spec.add_dependency "isodoc", "~> 0.9.0"
|
32
32
|
spec.add_dependency "iev", "~> 0.2.0"
|
33
|
-
spec.add_dependency "relaton", "~> 0.3.
|
33
|
+
spec.add_dependency "relaton", "~> 0.3.1"
|
34
34
|
spec.add_dependency "sterile"
|
35
|
+
spec.add_dependency "concurrent-ruby"
|
35
36
|
|
36
37
|
spec.add_development_dependency "bundler", "~> 1.15"
|
37
38
|
spec.add_development_dependency "byebug"
|
@@ -18,6 +18,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
18
18
|
[domain]#domain#
|
19
19
|
[strike]#strike#
|
20
20
|
[smallcap]#smallcap#
|
21
|
+
[keyword]#keyword#
|
21
22
|
INPUT
|
22
23
|
#{BLANK_HDR}
|
23
24
|
<sections>
|
@@ -35,6 +36,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
35
36
|
<domain>domain</domain>
|
36
37
|
<strike>strike</strike>
|
37
38
|
<smallcap>smallcap</smallcap>
|
39
|
+
<keyword>keyword</keyword>
|
38
40
|
</sections>
|
39
41
|
</standard-document>
|
40
42
|
OUTPUT
|
@@ -99,6 +101,7 @@ RSpec.describe Asciidoctor::Standoc do
|
|
99
101
|
Footnoted Reference to <<reference,fn>>
|
100
102
|
Inline Reference with Text to <<reference,text>>
|
101
103
|
Footnoted Reference with Text to <<reference,fn: text>>
|
104
|
+
Anchored Crossreference to other document <<a.adoc#b>>
|
102
105
|
INPUT
|
103
106
|
#{BLANK_HDR}
|
104
107
|
<sections>
|
@@ -107,7 +110,8 @@ RSpec.describe Asciidoctor::Standoc do
|
|
107
110
|
<p id="_">Inline Reference to <xref target="reference"/>
|
108
111
|
Footnoted Reference to <xref target="reference"/>
|
109
112
|
Inline Reference with Text to <xref target="reference">text</xref>
|
110
|
-
Footnoted Reference with Text to <xref target="reference">text</xref
|
113
|
+
Footnoted Reference with Text to <xref target="reference">text</xref>
|
114
|
+
Anchored Crossreference to other document <xref target="a#b"/></p>
|
111
115
|
</clause>
|
112
116
|
</sections>
|
113
117
|
</standard-document>
|
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.0.
|
4
|
+
version: 1.0.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.3.
|
75
|
+
version: 0.3.1
|
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: 0.3.
|
82
|
+
version: 0.3.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sterile
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: concurrent-ruby
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: bundler
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|