lib/isodoc/function/to_word_html.rb in isodoc-1.0.7 vs lib/isodoc/function/to_word_html.rb in isodoc-1.0.8

- old
+ new

@@ -38,18 +38,18 @@ Pathname.new(@filename).basename.to_s + tmpimagedir_suffix end # isodoc.css overrides any CSS injected by Html2Doc, which # is inserted before this CSS. - def define_head(html, filename, _dir) - html.head do |head| - if @standardstylesheet - head.style do |style| - stylesheet = File.read(@standardstylesheet, encoding: "utf-8"). - gsub("FILENAME", File.basename(filename)) - style.comment "\n#{stylesheet}\n" - end + def define_head(head, filename, _dir) + if @standardstylesheet + head.style do |style| + #stylesheet = File.read(@standardstylesheet, encoding: "utf-8"). + @standardstylesheet.open + stylesheet = @standardstylesheet.read. + gsub("FILENAME", File.basename(filename)) + style.comment "\n#{stylesheet}\n" end end end def body_attr @@ -147,11 +147,11 @@ def em_parse(node, out) out.i do |e| node.children.each { |n| parse(n, e) } end end - + def strong_parse(node, out) out.b do |e| node.children.each { |n| parse(n, e) } end end @@ -198,10 +198,10 @@ when "bookmark" then bookmark_parse(node, out) when "pagebreak" then page_break(out) when "callout" then callout_parse(node, out) when "stem" then stem_parse(node, out) when "clause" then clause_parse(node, out) - #when "appendix" then clause_parse(node, out) + #when "appendix" then clause_parse(node, out) when "xref" then xref_parse(node, out) when "eref" then eref_parse(node, out) when "origin" then eref_parse(node, out) when "link" then link_parse(node, out) when "ul" then ul_parse(node, out)