diff options
author | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-14 22:41:17 -0400 |
---|---|---|
committer | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-14 22:41:17 -0400 |
commit | c526e39da6e14d4e557f854aceaaff86c22530a8 (patch) | |
tree | bf866e10c8bb03796256b70e1947060168624a55 /pygments/lexers/text.py | |
parent | 745f1e190950d2510aecc33de9f1727e24ddddf0 (diff) | |
download | pygments-c526e39da6e14d4e557f854aceaaff86c22530a8.tar.gz |
Replace all occurences of a-zA-Z0-9_ with \w
Diffstat (limited to 'pygments/lexers/text.py')
-rw-r--r-- | pygments/lexers/text.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index 836eed60..f23c6980 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -234,11 +234,11 @@ class BaseMakefileLexer(RegexLexer): (r'\$[<@$+%?|*]', Keyword), (r'\s+', Text), (r'#.*?\n', Comment), - (r'(export)(\s+)(?=[a-zA-Z0-9_${}\t -]+\n)', + (r'(export)(\s+)(?=[\w${}\t -]+\n)', bygroups(Keyword, Text), 'export'), (r'export\s+', Keyword), # assignment - (r'([a-zA-Z0-9_${}.-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)', + (r'([\w${}.-]+)(\s*)([!?:+]?=)([ \t]*)((?:.*\\\n)+|.*\n)', bygroups(Name.Variable, Text, Operator, Text, using(BashLexer))), # strings (r'(?s)"(\\\\|\\.|[^"\\])*"', String.Double), @@ -257,7 +257,7 @@ class BaseMakefileLexer(RegexLexer): (r'\)', Keyword, '#pop'), ], 'export': [ - (r'[a-zA-Z0-9_${}-]+', Name.Variable), + (r'[\w${}-]+', Name.Variable), (r'\n', Text, '#pop'), (r'\s+', Text), ], @@ -597,7 +597,7 @@ class ApacheConfLexer(RegexLexer): (r'[^\S\n]+', Text), (r'\d+\.\d+\.\d+\.\d+(?:/\d+)?', Number), (r'\d+', Number), - (r'/([a-zA-Z0-9][a-zA-Z0-9_./-]+)', String.Other), + (r'/([a-zA-Z0-9][\w./-]+)', String.Other), (r'(on|off|none|any|all|double|email|dns|min|minimal|' r'os|productonly|full|emerg|alert|crit|error|warn|' r'notice|info|debug|registry|script|inetd|standalone|' |