posthtml-parser icon indicating copy to clipboard operation
posthtml-parser copied to clipboard

[perf]: The correct behavior for the parser.

Open Scrum opened this issue 5 years ago • 0 comments

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

Scrum avatar Sep 03 '19 07:09 Scrum