lib/isodoc/ieee/word_authority.rb in metanorma-ieee-1.3.3 vs lib/isodoc/ieee/word_authority.rb in metanorma-ieee-1.3.4

- old
+ new

@@ -151,13 +151,13 @@ # STYLE def feedback_style1(div, idx) div.xpath(".//p").each_with_index do |p, j| p["class"] = idx == 4 ? "IEEEStdsCRTextItal" : "IEEEStdsCRTextReg" - j.zero? && idx.zero? and - p.children.first.previous = - '<a style="mso-footnote-id:ftn0" href="#_ftnref0" name="_ftn0" title=""/>' + j.zero? && idx.zero? and p.add_first_child <<~XML + <a style="mso-footnote-id:ftn0" href="#_ftnref0" name="_ftn0" title=""/> + XML end end def authority_cleanup1(docxml, klass) dest = docxml.at("//div[@id = 'boilerplate-#{klass}-destination']") @@ -201,12 +201,12 @@ dest and dest << e1 end end def abstract_header(dest) - dest.elements.first.children.first.previous = - "<span class='IEEEStdsAbstractHeader'><span lang='EN-US'>" \ - "Abstract:</span></span> " + dest.elements.first.add_first_child <<~XML + <span class='IEEEStdsAbstractHeader'><span lang='EN-US'>Abstract:</span></span> + XML end def introduction_cleanup(docxml) dest = docxml.at("div[@id = 'introduction-destination']") or return unless i = docxml.at("//h1[@class = 'IntroTitle']")&.parent