Open jaydiablo opened 5 years ago
Ah that's a tough one. I think this happened when we switched from htmlparser2 to jsdom. Seems like the only option here is to pre-parse using a simpler HTML parser, detect the root tags, and then find those roots in the JSDOM-parsed version for extraction.
@developit Is it possible if this comes in the near feature? Or is it possible if we can manually show where to inject? An issue on their end. https://github.com/jsdom/jsdom/issues/710
Was testing using Critters to inline some critical CSS and noticed that it's inserting HTML/HEAD/BODY tags into output files that don't already have these tags.
These files intentionally don't have these tags because they're partials that are loaded by a separate system (in this case PHP). Removing Critters from the plugin chain prevents these tags from being added.
As an example, Critters is turning something like this:
Into this:
Possible to disable this behavior via an option?