lib/isodoc/word_function/table.rb in isodoc-1.3.0 vs lib/isodoc/word_function/table.rb in isodoc-1.3.1

- old
+ new

@@ -41,14 +41,24 @@ "mso-table-overlap:never;border-spacing:0;border-width:1px;#{keep_style(node)}", class: (node.text.length > 4000 ? "MsoISOTableBig" : "MsoISOTable") })) end + def colgroup(node, t) + colgroup = node.at(ns("./colgroup")) or return + t.colgroup do |cg| + colgroup.xpath(ns("./col")).each do |c| + cg.col **{ width: c["width"] } + end + end + end + def table_parse(node, out) @in_table = true table_title_parse(node, out) out.div **{ align: "center", class: "table_container" } do |div| div.table **table_attrs(node) do |t| + colgroup(node, t) thead_parse(node, t) tbody_parse(node, t) tfoot_parse(node, t) (dl = node.at(ns("./dl"))) && parse(dl, out) node.xpath(ns("./note")).each { |n| parse(n, out) }