Issue #329 - lexer.c - do not discard this newline here
This commit is contained in:
parent
0bd6ba30b4
commit
569ae4b435
|
@ -2986,7 +2986,9 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
|
|||
{
|
||||
c = TY_(ReadChar)(doc->docIn);
|
||||
|
||||
if (c != '\n' && c != '\f')
|
||||
if ((c == '\n') && (mode != IgnoreWhitespace)) /* Issue #329 - Can NOT afford to lose this newline */
|
||||
TY_(UngetChar)(c, doc->docIn); /* Issue #329 - make sure the newline is maintained for now */
|
||||
else if (c != '\n' && c != '\f')
|
||||
TY_(UngetChar)(c, doc->docIn);
|
||||
|
||||
lexer->waswhite = yes; /* to swallow leading whitespace */
|
||||
|
|
Loading…
Reference in a new issue