Method: IsoDoc::Function::Cleanup#table_get_or_make_tfoot

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

#table_get_or_make_tfoot(t) ⇒ Object



115
116
117
118
119
120
121
122
123
124
# File 'lib/isodoc/function/cleanup.rb', line 115

def table_get_or_make_tfoot(t)
  tfoot = t.at(".//tfoot")
  if tfoot.nil?
    t.add_child("<tfoot></tfoot>")
    tfoot = t.at(".//tfoot")
  else
    tfoot.xpath(".//td | .//th").each { |td| remove_bottom_border(td) }
  end
  tfoot
end