lib/gara/html5_emitter.rb in gara-0.1.4 vs lib/gara/html5_emitter.rb in gara-0.1.5
- old
+ new
@@ -47,10 +47,10 @@
def emit
nodes = @doc.children
if nodes.length.eql?(1) && nodes.first.name.eql?("html")
# necessary to include doctype - TODO: avoid calling to_html twice
- Nokogiri::HTML::Document.parse( @doc.to_html ).to_html
+ Nokogiri::HTML::Document.parse( @doc.to_html ).to_xhtml(indent: 2)
else
@doc.to_html
end
end
\ No newline at end of file