Method: IsoDoc::Function::Cleanup#table_footnote_cleanup

Defined in:
lib/isodoc/function/cleanup.rb

#table_footnote_cleanup(docxml) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/isodoc/function/cleanup.rb', line 94

def table_footnote_cleanup(docxml)
  docxml.xpath("//table[descendant::aside]").each do |t|
    t.xpath(".//aside").each do |a|
      merge_fnref_into_fn_text(a)
      a.name = "div"
      a["class"] = "TableFootnote"
      t << a.remove
    end
  end
  # preempt html2doc putting MsoNormal there
  docxml.xpath("//p[not(self::*[@class])]"\
               "[ancestor::*[@class = 'TableFootnote']]").each do |p|
    p["class"] = "TableFootnote"
  end
end