diff options
author | user <user@ubuntu> | 2013-09-18 01:37:52 -0700 |
---|---|---|
committer | user <user@ubuntu> | 2013-09-18 01:37:52 -0700 |
commit | 9e503cdebcdf77549a114adae1c644b701135c52 (patch) | |
tree | 8b1af816a492d7ebadd29b3ce1ce05d897a0e376 /pygments/lexers/shell.py | |
parent | 1ea0fa53d253eae501f0a48611dd01493240b34d (diff) | |
download | pygments-9e503cdebcdf77549a114adae1c644b701135c52.tar.gz |
Avoid highlighting intraword tokens.
Diffstat (limited to 'pygments/lexers/shell.py')
-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), |