diff options
author | pommicket <pommicket@gmail.com> | 2022-10-28 13:28:18 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-10-28 13:28:18 -0400 |
commit | af6a9c5552d3bd4e708d644cc47e4be4ca2edaf8 (patch) | |
tree | 700fa3006babc185018b9ac49cdec90dbce50cb9 /syntax.c | |
parent | 67beb21c710509acdb11017a77805ec57676e666 (diff) |
fixed rust '\\' highlighting, among other things
Diffstat (limited to 'syntax.c')
-rw-r--r-- | syntax.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -394,6 +394,10 @@ static void syntax_highlight_rust(SyntaxState *state, char32_t const *line, u32 if (line[char_end] == '\'' && backslashes % 2 == 0) { break; } + if (line[char_end] == '\\') + ++backslashes; + else + backslashes = 0; if (line[char_end] < CHAR_MAX && line[char_end - 1] != '\\' && !strchr("abcdefABCDEF0123456789", (char)line[char_end])) |