Method: IsoDoc::Function::Cleanup#figure_cleanup

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

#figure_cleanup(docxml) ⇒ Object

move footnotes into key, and get rid of footnote reference since it is in diagram



73
74
75
76
77
78
79
80
81
82
83
# File 'lib/isodoc/function/cleanup.rb', line 73

def figure_cleanup(docxml)
  docxml.xpath(FIGURE_WITH_FOOTNOTES).each do |f|
    next unless f.at(".//aside[not(ancestor::p[@class = 'FigureTitle'])]")

    key = figure_get_or_make_dl(f)
    f.xpath(".//aside").each do |aside|
      figure_aside_process(f, aside, key)
    end
  end
  docxml
end