Skip to content

fix(lexers): recognize escapes in Luau strings - #1505

Merged
github-actions[bot] merged 1 commit into
alecthomas:masterfrom
yxshee:fix/luau-string-escapes-nov19
Nov 18, 2026
Merged

github-actions[bot] merged 1 commit into
alecthomas:masterfrom
yxshee:fix/luau-string-escapes-nov19

Conversation

@yxshee

@yxshee yxshee commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Luau will print all three. All backslashes are flagged as Error by Chroma, with the initial 123 considered part of an escape sequence.

print("123\x41", 'x42\066', `\u{43}`)

Each alternative in the string escape rule now starts with a backslash, including the braced hexadecimal digits in a Unicode escape. As before, the rule applies to single quotes, double quotes and backticks. This also changes digit highlighting in quoted code that the current lexer misreads inside some multiline comments.

There are three errors about backslashes on master. All three are fixed with this patch. bit -f test, bit -f lint, bit -f check-generated, go test -count=1 ./... all succeed.

@github-actions
github-actions Bot enabled auto-merge (squash) November 18, 2026 21:50
@github-actions
github-actions Bot merged commit ba73267 into alecthomas:master Nov 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant