metanorma-iso 3.1.7 → 3.1.8
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/lib/isodoc/iso/presentation_xml_convert.rb +2 -1
- data/lib/isodoc/iso/xref.rb +15 -1
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '06585186ffa8c41465b19f7e7b98c16af489febfa31216e5358d10f8103fe3b6'
|
4
|
+
data.tar.gz: '097fa39c8d80b04eadad3d7e301a445bdceaceccfd89bedff64830f39bb80b82'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b84e6420b6f72a068dbf66a3a52e7e6264206ea39d1eb260d1c5087bf4eeb0e28e1add9b0c66df348dbed3ba4e814f0ce78f1ed65d5718430324ba594068d4f
|
7
|
+
data.tar.gz: 4f2b014aad730605cd669832e2b0243f06223cc21bd226f261fb2597d61eb103bf91695ad20ec76c5571e53649290d13fc3e802be97b4fb88c890d5ff6684a20
|
@@ -37,7 +37,8 @@ module IsoDoc
|
|
37
37
|
requirement docxml
|
38
38
|
recommendation docxml
|
39
39
|
requirement_render docxml
|
40
|
-
@xrefs.anchors_previous =
|
40
|
+
@xrefs.anchors_previous =
|
41
|
+
@xrefs.anchors.transform_values(&:dup) # store old xrefs of reqts
|
41
42
|
@xrefs.parse docxml
|
42
43
|
# TODO move this dependency around: requirements at root should be processed before everything else
|
43
44
|
table docxml # have table include requirements newly converted to tables
|
data/lib/isodoc/iso/xref.rb
CHANGED
@@ -250,7 +250,21 @@ container: false)
|
|
250
250
|
has_table_prefix = @anchors.dig(e, :has_table_prefix)
|
251
251
|
has_table_prefix and return
|
252
252
|
super
|
253
|
-
#has_table_prefix and @anchors[e][:has_table_prefix] = true # restore
|
253
|
+
# has_table_prefix and @anchors[e][:has_table_prefix] = true # restore
|
254
|
+
end
|
255
|
+
|
256
|
+
def localise_anchors(type = nil)
|
257
|
+
@anchors.each do |id, v|
|
258
|
+
type && v[:type] != type and next
|
259
|
+
#v[:has_table_prefix] and next
|
260
|
+
# has already been l10n'd, is copied from prev iteration
|
261
|
+
%i(label value xref xref_bare modspec).each do |t|
|
262
|
+
v[t] && !v[t].empty? or next
|
263
|
+
# Skip if value unchanged from previous iteration
|
264
|
+
@anchors_previous&.dig(id, t) == v[t] and next
|
265
|
+
v[t] = @i18n.l10n(v[t])
|
266
|
+
end
|
267
|
+
end
|
254
268
|
end
|
255
269
|
end
|
256
270
|
end
|