lib/asciidoctor/mpfa/section.rb in metanorma-mpfa-0.6.11 vs lib/asciidoctor/mpfa/section.rb in metanorma-mpfa-0.6.12

- old
+ new

@@ -4,20 +4,18 @@ # A {Converter} implementation that generates MPFD output, and a document # schema encapsulation of the document for validation # class Converter < Standoc::Converter - def sections_cleanup(x) + def sections_cleanup(xml) super - x.xpath("//*[@inline-header]").each do |h| + xml.xpath("//*[@inline-header]").each do |h| h.delete("inline-header") end - x.xpath("//*[@guidance]").each do |h| - #c = h.at("./preceding-sibling::clause[last()]") || next + xml.xpath("//*[@guidance]").each do |h| c = h.xpath("./preceding-sibling::clause") c.empty? and next - #c.add_child h.remove c.last.add_child h.remove end end def sectiontype_streamline(ret) @@ -27,10 +25,10 @@ super end end def term_def_title(_toplevel, node) - return node.title + node.title end def move_sections_into_preface(x, preface) foreword = x.at("//foreword") preface.add_child foreword.remove if foreword