posthtml-parser
posthtml-parser copied to clipboard
[perf]: The correct behavior for the parser.
The correct behavior for the parser would be throwing an error in the case where unclosed tags are met, instead of silently returning wrongly parsed HTML. Otherwise that's really confusing from the level of dependent packages like posthtml-include
.
I'd add that test case:
<include src="a.html"/>
<include src="b.html"/>
Otherwise I've spent, like, ~2 hours figuring that out, somebody else can get trapped there too.
Originally posted by @dy in https://github.com/posthtml/posthtml-parser/issues/23#issuecomment-527220940