Method: IsoDoc::HtmlFunction::Html#html_footnote_filter

Defined in:
lib/isodoc/html_function/postprocess_footnotes.rb

#html_footnote_filter(docxml) ⇒ Object



17
18
19
20
21
22
23
24
25
# File 'lib/isodoc/html_function/postprocess_footnotes.rb', line 17

def html_footnote_filter(docxml)
  seen = {}
  i = 1
  docxml.xpath('//a[@class = "FootnoteRef"]').each do |x|
    fn = docxml.at(%<//*[@id = '#{x['href'].sub(/^#/, '')}']>) || next
    i, seen = update_footnote_filter(fn, x, i, seen)
  end
  docxml
end