diff --git a/src/languages/cpp.js b/src/languages/cpp.js index 1b3e337784..199fb9c99f 100644 --- a/src/languages/cpp.js +++ b/src/languages/cpp.js @@ -112,7 +112,8 @@ export default function(hljs) { begin: /<.*?>/ }, C_LINE_COMMENT_MODE, - hljs.C_BLOCK_COMMENT_MODE + hljs.C_BLOCK_COMMENT_MODE, + NUMBERS ] }; diff --git a/test/markup/cpp/preprocessor.txt b/test/markup/cpp/preprocessor.txt index 69964a8768..810e5a8e90 100644 --- a/test/markup/cpp/preprocessor.txt +++ b/test/markup/cpp/preprocessor.txt @@ -28,6 +28,10 @@ if (p) { #endif } +// Test : digit separators in integer literals +#define MILLION 1'000'000 +int x = 1'000'000; + // this is a continued\ comment. end