diff options
author | Georg Brandl <georg@python.org> | 2014-01-09 20:57:52 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-09 20:57:52 +0100 |
commit | 1fede84d263990555cc90d585642e8c338f47b3d (patch) | |
tree | e4cc979e55e0ba8000659e4fa211ccaee42f1761 | |
parent | 5144a28cd491e1d30d4bc7e3c85b042238d3ce0f (diff) | |
download | pygments-1fede84d263990555cc90d585642e8c338f47b3d.tar.gz |
Closes #881: try to fix all instances of matching transpose operator as string.
-rw-r--r-- | pygments/lexers/math.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py index f275d4b0..ef0555aa 100644 --- a/pygments/lexers/math.py +++ b/pygments/lexers/math.py @@ -348,13 +348,13 @@ class MatlabLexer(RegexLexer): # quote can be transpose, instead of string: # (not great, but handles common cases...) - (r'(?<=[\w\)\]])\'', Operator), + (r'(?<=[\w\)\].])\'+', Operator), (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float), (r'\d+[eEf][+-]?[0-9]+', Number.Float), (r'\d+', Number.Integer), - (r'(?<![\w\)\]])\'', String, 'string'), + (r'(?<![\w\)\].])\'', String, 'string'), ('[a-zA-Z_][a-zA-Z0-9_]*', Name), (r'.', Text), ], @@ -812,8 +812,8 @@ class OctaveLexer(RegexLexer): # quote can be transpose, instead of string: # (not great, but handles common cases...) - (r'(?<=[\w\)\]])\'', Operator), - (r'(?<![\w\)\]])\'', String, 'string'), + (r'(?<=[\w\)\].])\'+', Operator), + (r'(?<![\w\)\].])\'', String, 'string'), ('[a-zA-Z_][a-zA-Z0-9_]*', Name), (r'.', Text), @@ -877,8 +877,8 @@ class ScilabLexer(RegexLexer): # quote can be transpose, instead of string: # (not great, but handles common cases...) - (r'(?<=[\w\)\]])\'', Operator), - (r'(?<![\w\)\]])\'', String, 'string'), + (r'(?<=[\w\)\].])\'+', Operator), + (r'(?<![\w\)\].])\'', String, 'string'), (r'(\d+\.\d*|\d*\.\d+)([eEf][+-]?[0-9]+)?', Number.Float), (r'\d+[eEf][+-]?[0-9]+', Number.Float), |