Method: IsoDoc::HtmlFunction::Footnotes#get_table_ancestor_id

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

#get_table_ancestor_id(node) ⇒ Object



45
46
47
48
49
50
# File 'lib/isodoc/html_function/footnotes.rb', line 45

def get_table_ancestor_id(node)
  table = node.ancestors("table") || node.ancestors("figure")
  return UUIDTools::UUID.random_create.to_s if table.empty?

  table.last["id"]
end