Class: Metanorma::Plateau::Cleanup
- Inherits:
-
Jis::Cleanup
- Object
- Jis::Cleanup
- Metanorma::Plateau::Cleanup
- Defined in:
- lib/metanorma/plateau/cleanup.rb
Overview
after term def processed, process source after paragraphs so that the moving of paragraphs there does not include termdef
Instance Method Summary collapse
- #biblio_reorder(xmldoc) ⇒ Object
- #boilerplate_cleanup(xmldoc) ⇒ Object
- #boilerplate_file(_x_orig) ⇒ Object
- #termdef_cleanup(xmldoc) ⇒ Object
Instance Method Details
#biblio_reorder(xmldoc) ⇒ Object
20 21 22 23 24 |
# File 'lib/metanorma/plateau/cleanup.rb', line 20 def biblio_reorder(xmldoc) xmldoc.xpath("//references").each do |r| biblio_reorder1(r) end end |
#boilerplate_cleanup(xmldoc) ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/metanorma/plateau/cleanup.rb', line 26 def boilerplate_cleanup(xmldoc) super conv = boilerplate_isodoc(xmldoc) or return c = process_boilerplate_file(File.join(@libdir, "colophon.adoc"), conv) xmldoc.root << "<colophon>#{c.children.first.to_xml}</colophon>" end |
#boilerplate_file(_x_orig) ⇒ Object
6 7 8 |
# File 'lib/metanorma/plateau/cleanup.rb', line 6 def boilerplate_file(_x_orig) nil end |
#termdef_cleanup(xmldoc) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/metanorma/plateau/cleanup.rb', line 10 def termdef_cleanup(xmldoc) super xmldoc.xpath("//source").each do |s| p = s.previous_element or next %w[p ol ul dl].include? p.name or next s.delete("type") s.parent = p end end |