isodoc 2.1.5 → 2.2.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c60f8eb9fcf49c289d99f64d901511387ae9d928a93c20ec81c011eb536f8a6a
|
4
|
+
data.tar.gz: f4c33c72526c543b3d7c4929a20dfaa2413e9d007b8d2315aed424e156ad4061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd64d2a35ac86b7b70d46b4ea3631070291b32ee014199d1bc395c5bf33c130d41527afcce573fddd49dc96a4f97d77a6e21a81ed45afec325ce2da61ad4c6ed
|
7
|
+
data.tar.gz: 758249109707c1a6132311e2706f9b791799960f063546cdc8d125f36919845e03bfc5546d2a68d47c30f782fd20b3de1143e66e88a53b5b5bb766e52407a2a7
|
data/lib/isodoc/class_utils.rb
CHANGED
@@ -15,8 +15,8 @@ module IsoDoc
|
|
15
15
|
def ns(xpath)
|
16
16
|
xpath.gsub(%r{/([a-zA-z])}, "/xmlns:\\1")
|
17
17
|
.gsub(%r{::([a-zA-z])}, "::xmlns:\\1")
|
18
|
-
.gsub(%r{\[([a-zA-z][a-z0-9A-Z
|
19
|
-
.gsub(%r{\[([a-zA-z][a-z0-9A-Z
|
18
|
+
.gsub(%r{\[([a-zA-z][a-z0-9A-Z@/-]* ?=)}, "[xmlns:\\1")
|
19
|
+
.gsub(%r{\[([a-zA-z][a-z0-9A-Z@/-]*[/\[\]])}, "[xmlns:\\1")
|
20
20
|
end
|
21
21
|
|
22
22
|
def liquid(doc)
|
@@ -17,7 +17,13 @@ module IsoDoc
|
|
17
17
|
def location_parse(node, out); end
|
18
18
|
|
19
19
|
def span_parse(node, out)
|
20
|
-
node
|
20
|
+
if node["style"]
|
21
|
+
out.span **{ style: node["style"] } do |s|
|
22
|
+
node.children.each { |n| parse(n, s) }
|
23
|
+
end
|
24
|
+
else
|
25
|
+
node.children.each { |n| parse(n, out) }
|
26
|
+
end
|
21
27
|
end
|
22
28
|
|
23
29
|
def callout_parse(node, out)
|
@@ -57,12 +63,11 @@ module IsoDoc
|
|
57
63
|
def eref_url(bibitemid)
|
58
64
|
return nil if @bibitems.nil? || @bibitems[bibitemid].nil?
|
59
65
|
|
60
|
-
|
61
|
-
url.text
|
62
|
-
|
63
|
-
@bibitems[bibitemid]
|
64
|
-
|
65
|
-
end
|
66
|
+
url = @bibitems[bibitemid].at(ns("./uri[@type = 'citation']")) and
|
67
|
+
return url.text
|
68
|
+
@bibitems[bibitemid]["hidden"] == "true" and
|
69
|
+
return @bibitems[bibitemid].at(ns("./uri"))&.text
|
70
|
+
"##{bibitemid}"
|
66
71
|
end
|
67
72
|
|
68
73
|
def eref_parse(node, out)
|
@@ -5,15 +5,15 @@ module IsoDoc
|
|
5
5
|
"."
|
6
6
|
end
|
7
7
|
|
8
|
-
def clausedelimspace(out)
|
8
|
+
def clausedelimspace(_node, out)
|
9
9
|
insert_tab(out, 1)
|
10
10
|
end
|
11
11
|
|
12
|
-
def inline_header_title(out,
|
12
|
+
def inline_header_title(out, node, title)
|
13
13
|
out.span **{ class: "zzMoveToFollowing" } do |s|
|
14
14
|
s.b do |b|
|
15
15
|
title&.children&.each { |c2| parse(c2, b) }
|
16
|
-
clausedelimspace(out) if /\S/.match?(title&.text)
|
16
|
+
clausedelimspace(node, out) if /\S/.match?(title&.text)
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -218,7 +218,7 @@ module IsoDoc
|
|
218
218
|
when "feedback-statement" then feedback_parse(node, out)
|
219
219
|
when "passthrough" then passthrough_parse(node, out)
|
220
220
|
when "amend" then amend_parse(node, out)
|
221
|
-
when "tab" then clausedelimspace(out) # in Presentation XML only
|
221
|
+
when "tab" then clausedelimspace(node, out) # in Presentation XML only
|
222
222
|
when "svg" then svg_parse(node, out) # in Presentation XML only
|
223
223
|
when "add" then add_parse(node, out)
|
224
224
|
when "del" then del_parse(node, out)
|
data/lib/isodoc/version.rb
CHANGED
@@ -98,7 +98,7 @@ module IsoDoc
|
|
98
98
|
docxml.xpath("//p[@class='Biblio']//span[@style='mso-tab-count:1']")
|
99
99
|
.each do |s|
|
100
100
|
s.next.text? or next
|
101
|
-
s.next.replace(s.next.text.sub(/^\s+/, ""))
|
101
|
+
s.next.replace(@c.encode(s.next.text.sub(/^\s+/, ""), :hexadecimal))
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: isodoc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciimath
|