Method: IsoDoc::HtmlFunction::Footnotes#table_footnote_parse

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

#table_footnote_parse(node, out) ⇒ Object

@seen_footnote: do not output footnote text if we have already seen it for this table



55
56
57
58
59
60
61
62
63
64
65
66
67
# File 'lib/isodoc/html_function/footnotes.rb', line 55

def table_footnote_parse(node, out)
  fn = node["reference"] || UUIDTools::UUID.random_create.to_s
  tid = get_table_ancestor_id(node)
  make_table_footnote_link(out, tid + fn, fn)
  return if @seen_footnote.include?(tid + fn)

  @in_footnote = true
  out.aside class: "footnote" do |a|
    a << make_table_footnote_text(node, tid + fn, fn)
  end
  @in_footnote = false
  @seen_footnote << (tid + fn)
end