Nokogiri adds DOCTYPEs #1

Closed
neeklamy opened this Issue Aug 16, 2012 · 1 comment

Projects

None yet

2 participants

@neeklamy

Nokogiri adds DOCTYPEs to the body of the output, from the cheat sheet:

Generally speaking, unless you expect to have a DOCTYPE and a single root node,
you don’t have a document, you have a fragment. For HTML, another rule of thumb
is that documents have html and body tags, and fragments usually do not.

Changing line 47 from doc = Nokogiri::HTML(content) to doc = Nokogiri::HTML.fragment(content) fixes it.

Jekyll 0.11.2
Nokogiri 1.5.5

@matthewowen
Owner

Oh man, how silly! Can't believe I didn't notice that - thanks for pointing out.

Cheers,
Matt

@matthewowen matthewowen added a commit that referenced this issue Aug 16, 2012
@matthewowen #1 fix: Update use of nokogiri
Fix rather silly error resulting in outputting DOCTYPE, head, etc.
da4664b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment