diff options
author | Tim Hatch <tim@timhatch.com> | 2014-05-18 20:51:16 -0700 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2014-05-18 20:51:16 -0700 |
commit | 8e4acf008bbe4233bd075d2f25c7fbafd861f710 (patch) | |
tree | 7756d06362c405ab4ffde123e184ec943d485832 | |
parent | 22603938a79b5c42fd607849608991977ff4ff81 (diff) | |
parent | 0a0a38ada22cfe4b163753a8fe0c2e14dd263a91 (diff) | |
download | pygments-8e4acf008bbe4233bd075d2f25c7fbafd861f710.tar.gz |
Merged in dscorbett/pygments-vb.net (pull request #362)
Fix VbNetLexer.analyse_text
-rw-r--r-- | pygments/lexers/dotnet.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py index a490314b..eb18df71 100644 --- a/pygments/lexers/dotnet.py +++ b/pygments/lexers/dotnet.py @@ -460,12 +460,11 @@ class VbNetLexer(RegexLexer): } def analyse_text(text): - if (re.search(r'^[ \t]*#If', text, re.I) - or re.search(r'^[ \t]*(Module|Namespace)', re.I)): + if re.search(r'^\s*(#If|Module|Namespace)', text, + re.IGNORECASE | re.MULTILINE): return 0.5 - class GenericAspxLexer(RegexLexer): """ Lexer for ASP.NET pages. |