lib/asciidoctor/itu/cleanup.rb in metanorma-itu-1.2.10 vs lib/asciidoctor/itu/cleanup.rb in metanorma-itu-1.2.11

- old
+ new

@@ -3,9 +3,18 @@ class Converter < Standoc::Converter def sections_cleanup(x) super insert_missing_sections(x) unless @no_insert_missing_sections insert_empty_clauses(x) + resolution_inline_header(x) + end + + def resolution_inline_header(x) + return unless x&.at("//bibdata/ext/doctype")&.text == "resolution" + x.xpath("//clause//clause").each do |c| + next if title = c.at("./title") and !title&.text&.empty? + c["inline-header"] = true + end end def table_cleanup(xmldoc) super xmldoc.xpath("//thead/tr[1]/th | //thead/tr[1]/td").each do |t|