diff options
author | Matthäus G. Chajdas <dev@anteru.net> | 2020-01-07 21:10:52 +0100 |
---|---|---|
committer | Matthäus G. Chajdas <dev@anteru.net> | 2020-01-07 21:10:52 +0100 |
commit | c7751058ec70e380fa57b7a8db102c1a8a37c25c (patch) | |
tree | e1097d74aedbe4aef48f9fdcab0c3b74ce48ae9f /pygments/lexers/matlab.py | |
parent | d55d8be8da86fb5a273263375fab90993ddb7e9e (diff) | |
parent | 4f8b0b66ebb7ea5695441d5a97ac836b75e97e7a (diff) | |
download | pygments-git-c7751058ec70e380fa57b7a8db102c1a8a37c25c.tar.gz |
Merge branch 'master' into 671/upsuper/webidl
This allows us to resolve the merge conflict properly.
Diffstat (limited to 'pygments/lexers/matlab.py')
-rw-r--r-- | pygments/lexers/matlab.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pygments/lexers/matlab.py b/pygments/lexers/matlab.py index 64dd3a3c..16df0398 100644 --- a/pygments/lexers/matlab.py +++ b/pygments/lexers/matlab.py @@ -104,8 +104,8 @@ class MatlabLexer(RegexLexer): # is recognized if it is either surrounded by spaces or by no # spaces on both sides; only the former case matters for us. (This # allows distinguishing `cd ./foo` from `cd ./ foo`.) - (r'(?:^|(?<=;))\s*\w+\s+(?!=|\(|(%s)\s+)' % _operators, Name, - 'commandargs'), + (r'(?:^|(?<=;))(\s*)(\w+)(\s+)(?!=|\(|(%s)\s+)' % _operators, + bygroups(Text, Name, Text), 'commandargs'), # operators: (_operators, Operator), @@ -147,9 +147,10 @@ class MatlabLexer(RegexLexer): (r"[^']*'", String, '#pop'), ], 'commandargs': [ + (r"[ \t]+", Text), ("'[^']*'", String), - ("[^';\n]+", String), - (";?\n?", Punctuation, '#pop'), + (r"[^';\s]+", String), + (";?", Punctuation, '#pop'), ] } |