diff options
-rw-r--r-- | pygments/lexers/compiled.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 003c7fff..9ffbebf1 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -35,7 +35,7 @@ class CLexer(RegexLexer): (r'\n', Text), (r'\s+', Text), (r'\\\n', Text), # line continuation - (r'//.*?(?!\\)\n', Comment), + (r'//(\n|(.|\n)*?[^\\]\n)', Comment), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment), ], 'statements': [ @@ -126,7 +126,7 @@ class CppLexer(RegexLexer): (r'\n', Text), (r'\s+', Text), (r'\\\n', Text), # line continuation - (r'//.*?(?!\\)\n', Comment), + (r'//(\n|(.|\n)*?[^\\]\n)', Comment), (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment), (r'[{}]', Keyword), (r'L?"', String, 'string'), |