lib/isodoc/mpfa/base_convert.rb in metanorma-mpfa-0.5.1 vs lib/isodoc/mpfa/base_convert.rb in metanorma-mpfa-0.5.2

- old
+ new

@@ -26,18 +26,23 @@ FRONT_CLAUSE = "//*[parent::preface]".freeze def preface(isoxml, out) isoxml.xpath(ns(self.class::FRONT_CLAUSE)).each do |c| if c.name == "terms" || c.at(ns(".//terms")) then terms_defs isoxml, out, 0 + elsif !is_clause?(c.name) then parse(c, out) else out.div **attr_code(id: c["id"]) do |s| clause_name(nil, c&.at(ns("./title")), s, nil) c.elements.reject { |c1| c1.name == "title" }.each do |c1| parse(c1, s) end end end end + end + + def middle_clause + "//clause[parent::sections][not(descendant::terms)]" end def middle(isoxml, out) middle_title(out) middle_admonitions(isoxml, out)