Method: IsoDoc::Function::Cleanup#figure_aside_process

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

#figure_aside_process(f, aside, key) ⇒ Object



43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/isodoc/function/cleanup.rb', line 43

def figure_aside_process(f, aside, key)
  # get rid of footnote link, it is in diagram
  f&.at("./a[@class='TableFootnoteRef']")&.remove
  fnref = f.at(".//span[@class='TableFootnoteRef']/..")
  dt = key.add_child("<dt></dt>").first
  dd = key.add_child("<dd></dd>").first
  fnref.parent = dt
  aside.xpath(".//p").each do |a|
    a.delete("class")
    a.parent = dd
  end
end