Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Nokogiri adds DOCTYPEs #1

Closed
neeklamy opened this Issue · 1 comment

2 participants

neeklamy Matthew Owen
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

Matthew Owen
Owner

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

Cheers,
Matt

Matthew Owen matthewowen referenced this issue from a commit
Matthew Owen #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
Something went wrong with that request. Please try again.