summaryrefslogtreecommitdiff
path: root/pygments/lexers/shell.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2013-11-04 07:22:38 +0100
committerGeorg Brandl <georg@python.org>2013-11-04 07:22:38 +0100
commit790a48da558443b3aa4c9f04a55a43b1a48b3d4d (patch)
treeb022168e96cb87f9455cef338012a347f2e60bf6 /pygments/lexers/shell.py
parentb3ed638a1f5e5379e208bd0d5c90a7dac3b18afa (diff)
parent1e5bc0e412818a7dde5920a723663c385de0e1fb (diff)
downloadpygments-790a48da558443b3aa4c9f04a55a43b1a48b3d4d.tar.gz
Merged in goodwillcoding/pygments-main (pull request #229)
Make pygments.lexers.guess_lexer_for_filename py3 compatible.
Diffstat (limited to 'pygments/lexers/shell.py')
-rw-r--r--pygments/lexers/shell.py6
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),