diff options
| author | Camil Staps <info@camilstaps.nl> | 2016-06-16 09:07:08 +0200 |
|---|---|---|
| committer | Camil Staps <info@camilstaps.nl> | 2016-06-16 09:07:08 +0200 |
| commit | f4e8d4bb29b073078fff13c50e96c9c59921d8de (patch) | |
| tree | 6b8ffb49112546d1aa59ceb73bd072254f54da54 | |
| parent | 24ad4f3191ae7537e78e42f59fea8c316096bd1b (diff) | |
| download | pygments-git-f4e8d4bb29b073078fff13c50e96c9c59921d8de.tar.gz | |
Only += is an operator
| -rw-r--r-- | pygments/lexers/shell.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index f8d8194e..a5933afb 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -68,9 +68,7 @@ class BashLexer(RegexLexer): (r'\A#!.+\n', Comment.Hashbang), (r'#.*\n', Comment.Single), (r'\\[\w\W]', String.Escape), - (r'(\b\w+)(\s*)(=)', bygroups(Name.Variable, Text, Operator)), - (r'(\b\w+)(\s*)([+*/%-&|\^]|<<|>>)(=)', - bygroups(Name.Variable, Text, Operator, Operator)), + (r'(\b\w+)(\s*)(\+?=)', bygroups(Name.Variable, Text, Operator)), (r'[\[\]{}()=]', Operator), (r'<<<', Operator), # here-string (r'<<-?\s*(\'?)\\?(\w+)[\w\W]+?\2', String), |
