Characters after the `\z` escape sequence with newline in string literals is incorrectly highlighted by the lexer

Reproduction Steps

You can simply reproduce this by putting…

print("\z

reproduction step")

…into the script editor.

Expected Behavior

I expect the newline after the escape sequence \z to not be ignored by lexer and characters after that to be highlighted as string as normal.

Something like this:
Capture

Actual Behavior

Characters after \z with newline gets incorrectly highlighted.

Capture
There is no syntax error here (as expected) as this is a valid Luau syntax.

Issue Area: Studio
Issue Type: Other
Impact: Low
Frequency: Constantly

5 Likes

Thanks for the report! We’ll follow up when we have an update for you.

3 Likes

So sorry for the late response here. This should be fixed. Are you still experiencing the issue?