summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Hatch <tim@timhatch.com>2014-05-18 20:51:16 -0700
committerTim Hatch <tim@timhatch.com>2014-05-18 20:51:16 -0700
commit8e4acf008bbe4233bd075d2f25c7fbafd861f710 (patch)
tree7756d06362c405ab4ffde123e184ec943d485832
parent22603938a79b5c42fd607849608991977ff4ff81 (diff)
parent0a0a38ada22cfe4b163753a8fe0c2e14dd263a91 (diff)
downloadpygments-8e4acf008bbe4233bd075d2f25c7fbafd861f710.tar.gz
Merged in dscorbett/pygments-vb.net (pull request #362)
Fix VbNetLexer.analyse_text
-rw-r--r--pygments/lexers/dotnet.py5
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.