posthtml / posthtml-parser

Parse HTML/XML to PostHTMLTree

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[perf]: The correct behavior for the parser.

Scrum opened this issue · 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 #23 (comment)