metanorma-gb 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/gb/gbhtmlrender.rb +31 -0
- data/lib/isodoc/gb/gbwordrender.rb +36 -1
- data/lib/isodoc/gb/html/gb.scss +1 -0
- data/lib/metanorma/gb/version.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: 855b2e263e1e3ce0fd6b01c5a957258d946d32ca4c8c82e1063273623238c91d
|
4
|
+
data.tar.gz: 4b89c14b7a504a6152865aadf223fea4652d93ff3da642b8a61e84586d206ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42276795f4c0f2899699b7a2eab5ca2d5d1357d4808c485ce35d04538becc1c6d2fb7d2b53e91a9a8a470726f069c4c690287345cfbdfa5dd657dfa31f71f8b6
|
7
|
+
data.tar.gz: 567eb01aa9b26dce3ad5ad3b431429e5a2ee069f628825aab3f5a38e7f2ac904df66beaca28ef8ff6623369b688b24c8eecef362daa5ed46f5162d33bd4024ea
|
@@ -197,6 +197,37 @@ module IsoDoc
|
|
197
197
|
@anchors[ref["id"]] = { xref: reference }
|
198
198
|
end
|
199
199
|
=end
|
200
|
+
|
201
|
+
def example_p_parse(node, div)
|
202
|
+
div.p do |p|
|
203
|
+
p.span **{ class: "example_label" } do |s|
|
204
|
+
s << example_label(node)
|
205
|
+
end
|
206
|
+
insert_tab(p, 1)
|
207
|
+
node.first_element_child.children.each { |n| parse(n, p) }
|
208
|
+
end
|
209
|
+
node.element_children[1..-1].each { |n| parse(n, div) }
|
210
|
+
end
|
211
|
+
|
212
|
+
def example_parse1(node, div)
|
213
|
+
div.p do |p|
|
214
|
+
p.span **{ class: "example_label" } do |s|
|
215
|
+
s << example_label(node)
|
216
|
+
end
|
217
|
+
insert_tab(p, 1)
|
218
|
+
end
|
219
|
+
node.children.each { |n| parse(n, div) }
|
220
|
+
end
|
221
|
+
|
222
|
+
def example_parse(node, out)
|
223
|
+
out.div **{ id: node["id"], class: "example" } do |div|
|
224
|
+
if node.first_element_child.name == "p"
|
225
|
+
example_p_parse(node, div)
|
226
|
+
else
|
227
|
+
example_parse1(node, div)
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
200
231
|
end
|
201
232
|
end
|
202
233
|
end
|
@@ -39,7 +39,7 @@ module IsoDoc
|
|
39
39
|
{ valign: "top", class: "example_label",
|
40
40
|
style: "padding:2pt 2pt 2pt 2pt" }.freeze
|
41
41
|
|
42
|
-
def
|
42
|
+
def example_table_parse(node, out)
|
43
43
|
out.table **attr_code(id: node["id"], class: "example") do |t|
|
44
44
|
t.tr do |tr|
|
45
45
|
tr.td **EXAMPLE_TBL_ATTR do |td|
|
@@ -52,6 +52,10 @@ module IsoDoc
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def example_label(node)
|
56
|
+
l10n(super + ":")
|
57
|
+
end
|
58
|
+
|
55
59
|
def note_parse(node, out)
|
56
60
|
@note = true
|
57
61
|
out.table **attr_code(id: node["id"], class: "Note") do |t|
|
@@ -202,6 +206,37 @@ module IsoDoc
|
|
202
206
|
@anchors[ref["id"]] = { xref: reference }
|
203
207
|
end
|
204
208
|
=end
|
209
|
+
|
210
|
+
def example_p_parse(node, div)
|
211
|
+
div.p do |p|
|
212
|
+
p.span **{ class: "example_label" } do |s|
|
213
|
+
s << example_label(node)
|
214
|
+
end
|
215
|
+
insert_tab(p, 1)
|
216
|
+
node.first_element_child.children.each { |n| parse(n, p) }
|
217
|
+
end
|
218
|
+
node.element_children[1..-1].each { |n| parse(n, div) }
|
219
|
+
end
|
220
|
+
|
221
|
+
def example_parse1(node, div)
|
222
|
+
div.p do |p|
|
223
|
+
p.span **{ class: "example_label" } do |s|
|
224
|
+
s << example_label(node)
|
225
|
+
end
|
226
|
+
insert_tab(p, 1)
|
227
|
+
end
|
228
|
+
node.children.each { |n| parse(n, div) }
|
229
|
+
end
|
230
|
+
|
231
|
+
def example_parse(node, out)
|
232
|
+
out.div **{ id: node["id"], class: "example" } do |div|
|
233
|
+
if node.first_element_child.name == "p"
|
234
|
+
example_p_parse(node, div)
|
235
|
+
else
|
236
|
+
example_parse1(node, div)
|
237
|
+
end
|
238
|
+
end
|
239
|
+
end
|
205
240
|
end
|
206
241
|
end
|
207
242
|
end
|
data/lib/isodoc/gb/html/gb.scss
CHANGED
data/lib/metanorma/gb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-gb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|