diff options
author | Georg Brandl <georg@python.org> | 2013-10-03 19:51:44 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2013-10-03 19:51:44 +0200 |
commit | 91e5fce0f1aff5378da7b757d4c2644197c291bf (patch) | |
tree | 065a3acdc895af4f11790389e4394c6d7e5abc00 | |
parent | 80a0fc14880eeda196d000954a0c54fe82d01b71 (diff) | |
parent | 9e503cdebcdf77549a114adae1c644b701135c52 (diff) | |
download | pygments-91e5fce0f1aff5378da7b757d4c2644197c291bf.tar.gz |
Merged in rjollos/pygments-main/help (pull request #241)
Avoid highlighting intraword tokens.
-rw-r--r-- | pygments/lexers/shell.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index 5ec9deaa..01563ab7 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -228,9 +228,9 @@ class BatchLexer(RegexLexer): # like %~$VAR:zlt (r'%%?[~$:\w]+%?', Name.Variable), (r'::.*', Comment), # Technically :: only works at BOL - (r'(set)(\s+)(\w+)', bygroups(Keyword, Text, Name.Variable)), - (r'(call)(\s+)(:\w+)', bygroups(Keyword, Text, Name.Label)), - (r'(goto)(\s+)(\w+)', bygroups(Keyword, Text, Name.Label)), + (r'\b(set)(\s+)(\w+)', bygroups(Keyword, Text, Name.Variable)), + (r'\b(call)(\s+)(:\w+)', bygroups(Keyword, Text, Name.Label)), + (r'\b(goto)(\s+)(\w+)', bygroups(Keyword, Text, Name.Label)), (r'\b(set|call|echo|on|off|endlocal|for|do|goto|if|pause|' r'setlocal|shift|errorlevel|exist|defined|cmdextversion|' r'errorlevel|else|cd|md|del|deltree|cls|choice)\b', Keyword), |