diff options
Diffstat (limited to 'pygments/lexers/templates.py')
-rw-r--r-- | pygments/lexers/templates.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index bfca0d38..71055a9f 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -568,10 +568,12 @@ class MasonLexer(RegexLexer): } def analyse_text(text): - rv = 0.0 - if re.search('<&', text) is not None: - rv = 1.0 - return rv + result = 0.0 + if re.search(r'</%(class|doc|init)%>', text) is not None: + result = 1.0 + elif re.search(r'<&.+&>', text, re.DOTALL) is not None: + result = 0.11 + return result class MakoLexer(RegexLexer): |