Method: IsoDoc::HtmlFunction::Html#toHTML

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

#toHTML(result, filename) ⇒ Object



44
45
46
47
48
49
50
51
52
53
# File 'lib/isodoc/html_function/html.rb', line 44

def toHTML(result, filename)
  result = (from_xhtml(html_cleanup(to_xhtml(result))))
  result = populate_template(result, :html)
  #result = script_cdata(from_xhtml(move_images(to_xhtml(result))))
  result = from_xhtml(move_images(to_xhtml(result)))
  result = script_cdata(inject_script(result))
  File.open("#{filename}.html", "w:UTF-8") do |f|
    f.write(result)
  end
end