-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTMLParser doesn’t preserve all whitespace. #49
Comments
So, a couple of standards-related issues here:
|
Yeah, you’re right, Chrome 37, Firefox 30, Safari 6.1, and Opera 12.16 all remove the whitespace around As for the extra whitespace before |
So, all that said, lots of people use domino to parse, mutate, then serialize, so I wouldn't object to adding a new domino-specific api (maybe even tweaking document.outerHTML) to use hidden domino-specific properties to preserve more whitespace. But I think we need to keep the standard DOM APIs browser-compatible. |
First off, thank you so much for putting this module together; it’s exactly what I wanted jsdom to be! My one pedantic little issue is that when given a full document, the parser seems to discard the whitespace of its outermost elements. It also replaces the doctype declaration.
For example, if you pass this document…
…into domino.createDocument…
…the output is:
I think it would be ideal if the output matched the input.
The text was updated successfully, but these errors were encountered: