Switch from Hpricot to Nokogiri, WIP
use Nokogiri::XML.fragment as to not assume we are parsing a complete document
Always use Nokogiri's HTML parsing. Detect if it is a complete Document via DOCTYPE
use #to_xhtml to determine which tags can be self closing
self closing slash applied only to tags that are self closing in xhtml
remove content from dom that was inserted via "succeed"
remove cdata tokens when filtering javascript
detect cdata in html and use XML fragment parser.
remove haml namespace in erb tags
use next_sibling instead of next_element

since XML::Text is not a type of XML::Element
fix cdata indentation issue
rename strange test, added test for natural use case
escape square brackets in regex
Make doctype regex case insensitive
Remove unused local variable.
Decode HTML entities in filter content

Note that the implementation her is pretty awful, it should be replaced
with something better when possible. However it does, for the moment,
solve the problem at hand.
test whether html is actually a document without a doctype

from: https://github.com/haml/html2haml/pull/23#issuecomment-13675693
fixes test case where head and body tags are present with no html tag

https://github.com/haml/html2haml/blob/95271959c4a6dca1f3e1b2a310463a4875e81b59/test/html2haml_test.rb#L262
namespace haml's silent, loud, and block tags with `haml_` prefix
remove nested conditionals in attribute pairs