diff options
Diffstat (limited to 'pygments/lexers/c_cpp.py')
-rw-r--r-- | pygments/lexers/c_cpp.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pygments/lexers/c_cpp.py b/pygments/lexers/c_cpp.py index bbac406e..35ea517f 100644 --- a/pygments/lexers/c_cpp.py +++ b/pygments/lexers/c_cpp.py @@ -28,8 +28,10 @@ class CFamilyLexer(RegexLexer): #: optional Comment or Whitespace _ws = r'(?:\s|//.*?\n|/[*].*?[*]/)+' + + # The trailing ?, rather than *, avoids a geometric performance drop here. #: only one /* */ style comment - _ws1 = r'\s*(?:/[*].*?[*]/\s*)*' + _ws1 = r'\s*(?:/[*].*?[*]/\s*)?' tokens = { 'whitespace': [ |