Skip to content

Commit

Permalink
Merge 6f81566 into 793baae
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmaroli committed Sep 28, 2020
2 parents 793baae + 6f81566 commit d8675fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nokogiri/html/document_fragment.rb
Expand Up @@ -33,7 +33,7 @@ def initialize document, tags = nil, ctx = nil
self.errors = document.errors - preexisting_errors
else
# This is a horrible hack, but I don't care
if tags.strip =~ /^<body/i
if /^\s*?<body/i.match?(tags)
path = "/html/body"
else
path = "/html/body/node()"
Expand Down

0 comments on commit d8675fb

Please sign in to comment.