1. Georg Brandl
  2. pygments-main

Commits

Tim Hatch  committed 58fe7c2

Make BashLexer recognize end of words around '&', '|', and ';' properly.

Fixes #844

  • Participants
  • Parent commits 1ed98ab
  • Branches default

Comments (0)

Files changed (1)

File pygments/lexers/shell.py

View file
         'data': [
             (r'(?s)\$?"(\\\\|\\[0-7]+|\\.|[^"\\])*"', String.Double),
             (r"(?s)\$?'(\\\\|\\[0-7]+|\\.|[^'\\])*'", String.Single),
-            (r';', Text),
+            (r';', Punctuation),
+            (r'&', Punctuation),
             (r'\s+', Text),
-            (r'[^=\s\[\]{}()$"\'`\\<]+', Text),
+            (r'[^=\s\[\]{}()$"\'`\\<&|;]+', Text),
             (r'\d+(?= |\Z)', Number),
             (r'\$#?(\w+|.)', Name.Variable),
             (r'<', Text),