Skip to content

Commit 0138f72

Browse files
committed
Anchor whitespace regex
1 parent c133416 commit 0138f72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/language/parsing/trivia.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const singleLineComment = sequence([
2626
zeroOrMore(butNot(anySingleCharacter, literal('\n'), 'newline')),
2727
])
2828

29-
export const whitespace = regularExpression(/\s+/)
29+
export const whitespace = regularExpression(/^\s+/)
3030

3131
export const trivia = oneOrMore(
3232
oneOf([whitespace, singleLineComment, blockComment]),

0 commit comments

Comments
 (0)