Method: IsoDoc::Function::Table#table_attrs

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

#table_attrs(node) ⇒ Object



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

def table_attrs(node)
  width = node["width"] ? "width:#{node['width']};" : nil
  c = node["class"]
  bordered = "border-width:1px;border-spacing:0;"
  (%w(modspec).include?(c) || !c) or bordered = ""
  attr_code(
    id: node["id"],
    class: c || "MsoISOTable",
    style: "#{bordered}#{width}#{keep_style(node)}",
    title: node["alt"],
  )
end