taoqf / node-html-parser

A very fast HTML parser, generating a simplified DOM, with basic element query support.
MIT License
1.12k stars 112 forks source link

Parsed HTML Tags are automatically closed #209

Closed timlangner closed 2 years ago

timlangner commented 2 years ago

When I parse a div tag, the closing tag is automatically added. Is there any way I can prevent this?

For example: parse('<div>') -> <div></div> parse('</div>')-> nothing

timlangner commented 2 years ago

Found a workaround by putting everything I want to append in a string first and then append it to the body.