diff options
author | Tim Hatch <tim@timhatch.com> | 2013-05-09 18:16:46 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2013-05-09 18:16:46 -0700 |
commit | 046c4333e85b25f10aa5e961593840bcc90208e3 (patch) | |
tree | fccc53e8553235a505df83bdf5239881171476bb | |
parent | aba6fdd0a549542a0b7db7c7ca24c26626d2ee96 (diff) | |
download | pygments-046c4333e85b25f10aa5e961593840bcc90208e3.tar.gz |
Make BashLexer recognize end of words around '&', '|', and ';' properly.
Fixes #844
-rw-r--r-- | pygments/lexers/shell.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index eb87a674..3e621b84 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -67,9 +67,10 @@ class BashLexer(RegexLexer): '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), |