diff options
author | Alan Hamlett <alan.hamlett@gmail.com> | 2020-02-08 08:09:37 -0800 |
---|---|---|
committer | Alan Hamlett <alan.hamlett@gmail.com> | 2020-02-08 08:09:37 -0800 |
commit | 7a22f546821ec22a7cc53624fc961e604c089116 (patch) | |
tree | 2605e5075edd80f7de8014f9adc56db1e1afc3e8 /pygments/lexers/matlab.py | |
parent | 55193857195b6a36c70708fadbe01f3ed61c0a88 (diff) | |
download | pygments-git-7a22f546821ec22a7cc53624fc961e604c089116.tar.gz |
Multiline flag does not work with re.match
Diffstat (limited to 'pygments/lexers/matlab.py')
-rw-r--r-- | pygments/lexers/matlab.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pygments/lexers/matlab.py b/pygments/lexers/matlab.py index 16df0398..d39f1ff1 100644 --- a/pygments/lexers/matlab.py +++ b/pygments/lexers/matlab.py @@ -162,10 +162,10 @@ class MatlabLexer(RegexLexer): and '{' not in first_non_comment): return 1. # comment - elif re.match(r'^\s*%', text, re.M): + elif re.search(r'^\s*%', text, re.M): return 0.2 # system cmd - elif re.match(r'^!\w+', text, re.M): + elif re.search(r'^!\w+', text, re.M): return 0.2 |