Fixed issue with skipping newlines
This commit is contained in:
parent
8b1efa29c4
commit
edc4bf3db5
@ -72,12 +72,12 @@ export class TokenStream {
|
||||
return flushRaw() || this._readInlineStatementUnescaped();
|
||||
} else if (
|
||||
this._cs.column === 0 &&
|
||||
this._cs.peekAfter(this._isWhitespace) === TokenStream.STATEMENT
|
||||
this._cs.peekAfter(this._isSpace) === TokenStream.STATEMENT
|
||||
) {
|
||||
return flushRaw() || this._readStatement();
|
||||
} else if (
|
||||
this._cs.column === 0 &&
|
||||
this._cs.peekAfter(this._isWhitespace) === TokenStream.COMMENT
|
||||
this._cs.peekAfter(this._isSpace) === TokenStream.COMMENT
|
||||
) {
|
||||
return flushRaw() || this._readComment();
|
||||
} else {
|
||||
@ -169,7 +169,7 @@ export class TokenStream {
|
||||
|
||||
_readFullLineGeneric(tokenType, tag) {
|
||||
// Skip whitespace
|
||||
this._cs.nextWhile(this._isWhitespace);
|
||||
this._cs.nextWhile(this._isSpace);
|
||||
|
||||
// Skip tag
|
||||
this._cs.next(tag.length);
|
||||
@ -206,7 +206,7 @@ export class TokenStream {
|
||||
}
|
||||
|
||||
// Utility methods
|
||||
_isWhitespace(c) {
|
||||
return /\s/.test(c);
|
||||
_isSpace(c) {
|
||||
return /^\S\r\n/.test(c);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user