diff options
| author | Anteru <bitbucket@ca.sh13.net> | 2018-12-16 16:44:45 +0000 |
|---|---|---|
| committer | Anteru <bitbucket@ca.sh13.net> | 2018-12-16 16:44:45 +0000 |
| commit | 36ae70af5759971579b6284896b488d9cd4a21e9 (patch) | |
| tree | 8bfbe149a0f8bdc5935868e97267eb81a4857201 /pygments/lexers/rebol.py | |
| parent | 0874c59522678a9b49a0c0a58a1d13902bc5647f (diff) | |
| parent | 7b6313d7affd05eae1bff12c501e257dd2128eca (diff) | |
| download | pygments-git-36ae70af5759971579b6284896b488d9cd4a21e9.tar.gz | |
Merged in jwilk/pygments (pull request #707)
Fix syntax error in a regexp
Diffstat (limited to 'pygments/lexers/rebol.py')
| -rw-r--r-- | pygments/lexers/rebol.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pygments/lexers/rebol.py b/pygments/lexers/rebol.py index eff3fce0..e58e01fa 100644 --- a/pygments/lexers/rebol.py +++ b/pygments/lexers/rebol.py @@ -102,12 +102,12 @@ class RebolLexer(RegexLexer): yield match.start(), Generic.Heading, word elif re.match("to-.*", word): yield match.start(), Keyword, word - elif re.match('(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', + elif re.match(r'(\+|-|\*|/|//|\*\*|and|or|xor|=\?|=|==|<>|<|>|<=|>=)$', word): yield match.start(), Operator, word - elif re.match(".*\?$", word): + elif re.match(r".*\?$", word): yield match.start(), Keyword, word - elif re.match(".*\!$", word): + elif re.match(r".*\!$", word): yield match.start(), Keyword.Type, word elif re.match("'.*", word): yield match.start(), Name.Variable.Instance, word # lit-word @@ -297,10 +297,10 @@ class RedLexer(RegexLexer): yield match.start(), Keyword.Namespace, word elif re.match("to-.*", word): yield match.start(), Keyword, word - elif re.match('(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' - '<<<|>>>|<<|>>|<|>%)$', word): + elif re.match(r'(\+|-\*\*|-|\*\*|//|/|\*|and|or|xor|=\?|===|==|=|<>|<=|>=|' + r'<<<|>>>|<<|>>|<|>%)$', word): yield match.start(), Operator, word - elif re.match(".*\!$", word): + elif re.match(r".*\!$", word): yield match.start(), Keyword.Type, word elif re.match("'.*", word): yield match.start(), Name.Variable.Instance, word # lit-word |
