-
-
Notifications
You must be signed in to change notification settings - Fork 390
option ignoreWhitespace #90
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
Comments
It's hard to do this right when streaming. Also, I don't really see the point of it (the meaning of whitespace depends on the location in the document). |
In general, the idea of this option is to ignore spaces, tabs etc in those cases, when there are situated not in tag's attributes or in tag's content, but between tags. For example, if these option is This code <font>
<br>this is the text
<font> should be parsed as <font><br>this is the text<font> but now it is parsed as <font> <br>this is the text <font> </font></font> |
As an example why this is a bad idea: <p>foo<b> <i>bar</i></b></p> is usually rendered as
but with the change you're proposing, it becomes <p>foo<b><i>bar</i></b></p> which is rendered as
(Note the missing whitespace.) The current behavior of normalizing whitespace leads to problems in |
Is it possible to make this option work in the same way as in
node-htmlparser
!?The text was updated successfully, but these errors were encountered: