diff options
author | Georg Brandl <georg@python.org> | 2014-01-10 10:42:27 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-01-10 10:42:27 +0100 |
commit | c46a6d235361790b9cb9ccc5444e8d83b3a4e090 (patch) | |
tree | a4ea54fc313010190846573e4537cbd172b91c4e /pygments/lexers/math.py | |
parent | 78a68fd6a9610a91ea21ededef1eaac3499edbb1 (diff) | |
download | pygments-c46a6d235361790b9cb9ccc5444e8d83b3a4e090.tar.gz |
Closes #923: remove blanket nonzero analyse_text returns, and add an analyse_text for Makefile lexer
Diffstat (limited to 'pygments/lexers/math.py')
-rw-r--r-- | pygments/lexers/math.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/pygments/lexers/math.py b/pygments/lexers/math.py index ef0555aa..52956487 100644 --- a/pygments/lexers/math.py +++ b/pygments/lexers/math.py @@ -376,10 +376,9 @@ class MatlabLexer(RegexLexer): def analyse_text(text): if re.match('^\s*%', text, re.M): # comment - return 0.9 + return 0.2 elif re.match('^!\w+', text, re.M): # system cmd - return 0.9 - return 0.1 + return 0.2 line_re = re.compile('.*?\n') @@ -829,10 +828,6 @@ class OctaveLexer(RegexLexer): ], } - def analyse_text(text): - if re.match('^\s*[%#]', text, re.M): #Comment - return 0.1 - class ScilabLexer(RegexLexer): """ |