diff options
author | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-15 23:52:25 -0400 |
---|---|---|
committer | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-15 23:52:25 -0400 |
commit | 414c88e054f41981ec406971403a250f31270dfd (patch) | |
tree | 187dac55de5eb5fc2eb6cf8b404f89d288fd5514 /pygments/lexers/shell.py | |
parent | cf473924c5aa0268cb9e78cff6809a509a94169a (diff) | |
download | pygments-414c88e054f41981ec406971403a250f31270dfd.tar.gz |
Replace a-z0-9_ with \w when IGNORECASE is set
Diffstat (limited to 'pygments/lexers/shell.py')
-rw-r--r-- | pygments/lexers/shell.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/shell.py b/pygments/lexers/shell.py index 13201912..df9b56f4 100644 --- a/pygments/lexers/shell.py +++ b/pygments/lexers/shell.py @@ -390,13 +390,13 @@ class PowerShellLexer(RegexLexer): (r'`[\'"$@-]', Punctuation), (r'"', String.Double, 'string'), (r"'([^']|'')*'", String.Single), - (r'(\$|@@|@)((global|script|private|env):)?[a-z0-9_]+', + (r'(\$|@@|@)((global|script|private|env):)?\w+', Name.Variable), (r'(%s)\b' % '|'.join(keywords), Keyword), (r'-(%s)\b' % '|'.join(operators), Operator), - (r'(%s)-[a-z_][a-z0-9_]*\b' % '|'.join(verbs), Name.Builtin), - (r'\[[a-z_\[][a-z0-9_. `,\[\]]*\]', Name.Constant), # .net [type]s - (r'-[a-z_][a-z0-9_]*', Name), + (r'(%s)-[a-z_]\w*\b' % '|'.join(verbs), Name.Builtin), + (r'\[[a-z_\[][\w. `,\[\]]*\]', Name.Constant), # .net [type]s + (r'-[a-z_]\w*', Name), (r'\w+', Name), (r'[.,;@{}\[\]$()=+*/\\&%!~?^`|<>-]|::', Punctuation), ], |