lib/metanorma/modspec/cleanup.rb in mn-requirements-0.4.0 vs lib/metanorma/modspec/cleanup.rb in mn-requirements-0.4.1

- old
+ new

@@ -32,11 +32,11 @@ end def requirement_metadata1(reqt, dlist, ins) ins1 = super dlist.xpath("./dt").each do |e| - tag = e.text&.gsub(/ /, "-")&.downcase + tag = e.text&.tr(" ", "-")&.downcase tag = "description" if tag == "statement" next unless requirement_metadata_component_tags.include?(tag) ins1.next = requirement_metadata1_component(e, tag) ins1 = ins1.next @@ -91,10 +91,11 @@ v.children = v.at("./link/@target").text end end def requirement_metadata_to_component(reqt) - xpath = requirement_metadata_component_tags - %w(statement description) - + xpath = requirement_metadata_component_tags - %w(statement + description) - requirement_metadata_requirement_tags reqt.xpath(xpath.map { |x| ".//#{x}" }.join(" | ")).each do |c| c["class"] = c.name c.name = "component" end