lib/asciidoctor/iso/cleanup.rb in metanorma-iso-1.3.24 vs lib/asciidoctor/iso/cleanup.rb in metanorma-iso-1.3.25
- old
+ new
@@ -34,10 +34,11 @@
i, seen = other_footnote_renumber1(fn, i, seen)
end
end
def id_prefix(prefix, id)
+ return id.text if @amd # we're just inheriting the prefixes from parent doc
prefix.join("/") + ( id.text.match(%{^/}) ? "" : " " ) + id.text
end
def get_id_prefix(xmldoc)
prefix = []
@@ -113,9 +114,17 @@
title = bib&.at("./title[@type = 'main']")&.text ||
bib&.at("./title")&.text || bib&.at("./formattedref")&.text
"#{pubclass} :: #{type} :: "\
"#{num.nil? ? abbrid : sprintf("%09d", num.to_i)} :: "\
"#{partid} :: #{id&.text} :: #{title}"
+ end
+
+ def sections_cleanup(x)
+ super
+ return unless @amd
+ x.xpath("//*[@inline-header]").each do |h|
+ h.delete('inline-header')
+ end
end
end
end
end