lib/asciidoctor/iso/cleanup.rb in asciidoctor-iso-0.7.3 vs lib/asciidoctor/iso/cleanup.rb in asciidoctor-iso-0.7.4
- old
+ new
@@ -13,13 +13,13 @@
def textcleanup(text)
text.gsub(/\s+<fn /, "<fn ")
end
def cleanup(xmldoc)
+ termdef_cleanup(xmldoc)
sections_cleanup(xmldoc)
obligations_cleanup(xmldoc)
- termdef_cleanup(xmldoc)
table_cleanup(xmldoc)
formula_cleanup(xmldoc)
figure_cleanup(xmldoc)
ref_cleanup(xmldoc)
note_cleanup(xmldoc)
@@ -126,18 +126,18 @@
def termdef_boilerplate_cleanup(xmldoc)
xmldoc.xpath("//terms/p | //terms/ul").each(&:remove)
end
- def termdef_subsection_cleanup(xmldoc)
+ def termdef_subclause_cleanup(xmldoc)
xmldoc.xpath("//terms[terms]").each do |t|
t.name = "clause"
end
end
def termdocsource_cleanup(xmldoc)
- f = xmldoc.at("//foreword")
+ f = xmldoc.at("//preface | //sections")
xmldoc.xpath("//terms/termdocsource").each do |s|
f.previous = s.remove
end
end
@@ -145,10 +145,10 @@
termdef_unnest_cleanup(xmldoc)
termdef_stem_cleanup(xmldoc)
termdomain_cleanup(xmldoc)
termdefinition_cleanup(xmldoc)
termdef_boilerplate_cleanup(xmldoc)
- termdef_subsection_cleanup(xmldoc)
+ termdef_subclause_cleanup(xmldoc)
termdocsource_cleanup(xmldoc)
end
def biblio_cleanup(xmldoc)
xmldoc.xpath("//references[references]").each do |t|