node-html-parser
node-html-parser copied to clipboard
removeWhitespace + outerHTML don't remove meaningless white-spaces inside start and end tags
For example,
<!DOCTYPE html
><html lang="en"
><meta charset="UTF-8"
><title>test</title
><p>test</p
></html>
The extra white-spaces between html and lang="en" and the extra newlines inside tags aren't removed, even if I use removeWhitespace.
All regular browser implementations remove these meaningless white-spaces.