We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bd6ba3 commit 569ae4bCopy full SHA for 569ae4b
src/lexer.c
@@ -2986,7 +2986,9 @@ static Node* GetTokenFromStream( TidyDocImpl* doc, GetTokenMode mode )
2986
{
2987
c = TY_(ReadChar)(doc->docIn);
2988
2989
- if (c != '\n' && c != '\f')
+ if ((c == '\n') && (mode != IgnoreWhitespace)) /* Issue #329 - Can NOT afford to lose this newline */
2990
+ TY_(UngetChar)(c, doc->docIn); /* Issue #329 - make sure the newline is maintained for now */
2991
+ else if (c != '\n' && c != '\f')
2992
TY_(UngetChar)(c, doc->docIn);
2993
2994
lexer->waswhite = yes; /* to swallow leading whitespace */
0 commit comments