-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Description
Given a C source file with a character literal, the character always gets highlighter with error color unless it's a valid escape sequence:
char str[] = "a";
char broken = 'a'; // should be the same color as the "a" above
char escape = '\x11'The error highlighting comes from this rule in c.yaml, which makes me think the bounds of highlight regions with start/end are slightly off:
- constant.string:
start: "'"
end: "'"
skip: "\\\\."
rules:
- error: "..+"
- constant.specialChar: "\\\\([\"'abfnrtv\\\\]|[0-3]?[0-7]{1,2}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})"This used to work properly in v2.0.11, but is broken in v2.0.12 and newer. I used git bisect to track down the commit which changed the behavior: ceaa143
I also tried with a build from PR #3127 and it would fix this issue.
Metadata
Metadata
Assignees
Labels
No labels
