# File lib/maruku/html.rb, line 49 def initialize(raw_html) # Wrap our HTML in a dummy document with a doctype (just # for the entity references) wrapped = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd"> <html>' + raw_html.strip + '</html>' d = Nokogiri::XML::Document.parse(wrapped) {|c| c.nonet } @fragment = d.root end