Skip to content

Instantly share code, notes, and snippets.

View chaupt's full-sized avatar

Christopher Haupt chaupt

View GitHub Profile
# This fails with Nokogiri 1.4.1 (tested so far on Mac OS X 10.6.2 and EngineYard Cloud instances (custom GenToo?)
# The outer div gets stripped.
it "should handle html comments without removing outer divs" do
s = %|<!-- Some Comment -->
<div>
<div></div>
</div>
<!-- Another Comment -->|
fragment = Nokogiri::HTML.fragment(s)