metanorma-standoc 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/standoc/cleanup_reqt.rb +1 -1
- data/lib/metanorma/standoc/inline.rb +2 -1
- data/lib/metanorma/standoc/macros.rb +3 -3
- data/lib/metanorma/standoc/macros_form.rb +1 -1
- data/lib/metanorma/standoc/reqt.rb +5 -3
- data/lib/metanorma/standoc/version.rb +1 -1
- data/spec/vcr_cassettes/std-link.yml +15 -15
- 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: d2c3089664934dc34b5f41b7e03a7bc2d2b1060e17decafb29dfc1f36fb7bed0
|
4
|
+
data.tar.gz: 7ecc333b2847252e7965be128c701f4cb2241d148179cd43b66a9f5cd2a2e108
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5308c4354dc5fd14e1d5d18dc32e7b52d81ba492e53381771e7dfecea4c83af0bd73387af2bfb6c913687352eaad85c44ded592e1c95179d5d41b3974bc923ff
|
7
|
+
data.tar.gz: ba8122c376d231eb6f1f4f4ea235b608b4dd1769394a899fe9fcd6f5bee011f2384cf1455fae0d86d32648e37aee080c0db18755d4a761e793ad5164b500ce61
|
@@ -53,7 +53,7 @@ module Metanorma
|
|
53
53
|
permission).include?(text.name))) ||
|
54
54
|
(text.text.strip.empty? && !text.at(".//xref | .//eref | .//link"))
|
55
55
|
|
56
|
-
t = Nokogiri::XML::Element.new("description", reqt)
|
56
|
+
t = Nokogiri::XML::Element.new("description", reqt.document)
|
57
57
|
text.before(t)
|
58
58
|
t.children = text.remove
|
59
59
|
end
|
@@ -79,7 +79,8 @@ module Metanorma
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def inline_anchor_bibref(node)
|
82
|
-
eref_contents =
|
82
|
+
eref_contents = HTMLEntities.new
|
83
|
+
.decode(node.text || node.target || node.id)
|
83
84
|
&.sub(/^\[?([^\[\]]+?)\]?$/, "[\\1]")
|
84
85
|
@refids << (node.target || node.id)
|
85
86
|
noko do |xml|
|
@@ -130,7 +130,7 @@ module Metanorma
|
|
130
130
|
|
131
131
|
def process(parent, target, attrs)
|
132
132
|
out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"]).convert
|
133
|
-
%{<autonumber type
|
133
|
+
%{<autonumber type='#{target}'>#{out}</autonumber>}
|
134
134
|
end
|
135
135
|
end
|
136
136
|
|
@@ -143,9 +143,9 @@ module Metanorma
|
|
143
143
|
/^(?<lang>[^-]*)(?:-(?<script>.*))?$/ =~ target
|
144
144
|
out = Asciidoctor::Inline.new(parent, :quoted, attrs["text"]).convert
|
145
145
|
if script
|
146
|
-
%{<variant lang
|
146
|
+
%{<variant lang='#{lang}' script='#{script}'>#{out}</variant>}
|
147
147
|
else
|
148
|
-
%{<variant lang
|
148
|
+
%{<variant lang='#{lang}'>#{out}</variant>}
|
149
149
|
end
|
150
150
|
end
|
151
151
|
end
|
@@ -56,7 +56,7 @@ module Metanorma
|
|
56
56
|
m = %w(disabled value)
|
57
57
|
.map { |a| attr[a] ? " #{a}='#{attr[a]}'" : nil }.compact
|
58
58
|
out = Asciidoctor::Inline.new(parent, :quoted, attr["text"]).convert
|
59
|
-
%{<option #{m.join}
|
59
|
+
%{<option #{m.join}>#{out}</option>}
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
@@ -64,14 +64,16 @@ module Metanorma
|
|
64
64
|
def requirement_elems(node, out)
|
65
65
|
node.title and out.title { |t| t << node.title }
|
66
66
|
a = node.attr("label") and out.label do |l|
|
67
|
-
l << a
|
67
|
+
l << out.text(a)
|
68
68
|
end
|
69
69
|
a = node.attr("subject") and csv_split(a)&.each do |subj|
|
70
|
-
out.subject { |s| s << subj }
|
70
|
+
out.subject { |s| s << out.text(subj) }
|
71
71
|
end
|
72
72
|
a = HTMLEntities.new.decode(node.attr("inherit")) and
|
73
73
|
csv_split(a)&.each do |i|
|
74
|
-
out.inherit
|
74
|
+
out.inherit do |inh|
|
75
|
+
inh << HTMLEntities.new.encode(i, :hexadecimal)
|
76
|
+
end
|
75
77
|
end
|
76
78
|
classif = node.attr("classification") and
|
77
79
|
requirement_classification(classif, out)
|