summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--syntax.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/syntax.c b/syntax.c
index 5d83cdb..01e6b7d 100644
--- a/syntax.c
+++ b/syntax.c
@@ -158,7 +158,8 @@ static void syntax_highlight_c_cpp(SyntaxState *state_ptr, bool cpp, char32_t *l
char_types[i] = SYNTAX_CHARACTER;
}
} else if (!in_multi_line_comment && !in_single_line_comment && !in_string) {
- in_char = true;
+ if (i == 0 || !is32_digit(line[i-1])) // in C++, you can use ' as a separator, e.g. 1'000'000
+ in_char = true;
}
break;
case ANY_DIGIT: