1. Georg Brandl
  2. pygments-main

Commits

Tim Hatch  committed 9193955

Fix a couple of empty matches
---
pygments/lexers/math.py | 2 +-
pygments/lexers/web.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

  • Participants
  • Parent commits c87c7ed
  • Branches default

Comments (0)

Files changed (2)

File pygments/lexers/math.py

View file
  • Ignore whitespace
                             _scilab_builtins.macros_kw
                             ) + r')\b',  Name.Builtin),
 
-            ("(" + "|".join(_scilab_builtins.builtin_consts) + r')\b',
+            (r'(%s)\b' % "|".join(map(re.escape, _scilab_builtins.builtin_consts)),
              Name.Constant),
 
             # operators:

File pygments/lexers/web.py

View file
  • Ignore whitespace
             (r'#\)', Punctuation, 'operator'),
             (ur'\t|\r|\n|[\u0020-\U0000D7FF]|[\U0000E000-\U0000FFFD]|'
              ur'[\U00010000-\U0010FFFF]', Literal),
-            (r'(\s*)', Text),
+            (r'(\s+)', Text),
         ],
         'occurrenceindicator': [
             include('whitespace'),