summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuya Nishihara <yuya@tcha.org>2012-07-18 22:51:19 +0900
committerYuya Nishihara <yuya@tcha.org>2012-07-18 22:51:19 +0900
commit8014741aa9e3dc21052f5d534fd2028d6489c4ee (patch)
treee23fa0125a1823b8ed5fc5a2b206bc4e487f5d7e
parente2ea98f0f72ca05e55b234b2a6dd548692818ac2 (diff)
downloadpygments-8014741aa9e3dc21052f5d534fd2028d6489c4ee.tar.gz
Closes #791: CSharp: remove unneeded "|\n" from Comment.Multiline pattern
Because CSharpLexer enables re.DOTALL flag, "." also matches "\n". "(.|\n)" slows down matching speed significantly.
-rw-r--r--pygments/lexers/dotnet.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py
index 890d46d9..0a2770ca 100644
--- a/pygments/lexers/dotnet.py
+++ b/pygments/lexers/dotnet.py
@@ -88,7 +88,7 @@ class CSharpLexer(RegexLexer):
(r'[^\S\n]+', Text),
(r'\\\n', Text), # line continuation
(r'//.*?\n', Comment.Single),
- (r'/[*](.|\n)*?[*]/', Comment.Multiline),
+ (r'/[*].*?[*]/', Comment.Multiline),
(r'\n', Text),
(r'[~!%^&*()+=|\[\]:;,.<>/?-]', Punctuation),
(r'[{}]', Punctuation),