metanorma-ietf 3.7.8 → 3.7.9
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/ietf/cleanup.rb +2 -1
- data/lib/isodoc/ietf/references.rb +17 -2
- data/lib/metanorma/ietf/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: 171f4dbe44867eaf9404e9f897f1e31005fb0681b4eda1cedc1f6aceb346b5eb
|
|
4
|
+
data.tar.gz: eeeca25d422ab40b838193fd7e920bb249b0b5f8daeaddda56771fefcf272ed1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2fde219826a5df662cfdf76b67cb7b6f3732b568558ffd10c7d880e842146e915034561cdee1c859b60474d76532822432ac3b3dce326ae51575a86d34a5af45
|
|
7
|
+
data.tar.gz: 1fa3887cfe9c2445973dac2aea0e824bd5902f957a4f8523ef9dc2aa001d572af539586decc753609d25ca54b3d7803f8221a8b5d3935fb29ac3b4af87757070
|
data/lib/isodoc/ietf/cleanup.rb
CHANGED
|
@@ -109,7 +109,8 @@ module IsoDoc
|
|
|
109
109
|
xmldoc.xpath("//title").each { |s| title_flatten(s, xmldoc) }
|
|
110
110
|
xmldoc.xpath("//reference/front[not(author)]").each do |f|
|
|
111
111
|
insert = f.at("./seriesInfo[last()]") || f.at("./title")
|
|
112
|
-
|
|
112
|
+
author = "<author surname='Unknown'/>"
|
|
113
|
+
insert ? insert.next = author : f.prepend_child(author)
|
|
113
114
|
end
|
|
114
115
|
end
|
|
115
116
|
|
|
@@ -72,10 +72,25 @@ module IsoDoc
|
|
|
72
72
|
|
|
73
73
|
def bibitem_render(ref, bib)
|
|
74
74
|
bib1 = bibitem_render_prep(bib)
|
|
75
|
-
|
|
75
|
+
f = bib1.at(ns("./formattedref"))
|
|
76
|
+
# Ported from the presentation-XML layer
|
|
77
|
+
# (IsoDoc::PresentationXMLConvert#bibrender_relaton,
|
|
78
|
+
# isodoc/lib/isodoc/presentation_function/refs.rb). RfcConvert runs on
|
|
79
|
+
# semantic XML (use_presentation_xml == false) and skips presentation,
|
|
80
|
+
# so a bibitem with neither a title nor a formattedref -- e.g. a
|
|
81
|
+
# reference whose relaton fetch transiently failed
|
|
82
|
+
# (metanorma/metanorma-standoc#1216) -- would otherwise emit an empty,
|
|
83
|
+
# invalid RFC <front>. Fall back to the docidentifier as display text.
|
|
84
|
+
# REFACTOR (metanorma-ietf#272): duplicates presentation-layer logic;
|
|
85
|
+
# unify with the shared bibrender path when refactoring the reference
|
|
86
|
+
# pipeline.
|
|
87
|
+
did = bib1.at(ns("./docidentifier"))
|
|
88
|
+
if !bib1.at(ns("./title")) && (f || did)
|
|
76
89
|
ref.front do |front|
|
|
77
90
|
front.title do |t|
|
|
78
|
-
children_parse(f, t)
|
|
91
|
+
if f then children_parse(f, t)
|
|
92
|
+
else t << did.text
|
|
93
|
+
end
|
|
79
94
|
end
|
|
80
95
|
end
|
|
81
96
|
else
|