Commits

Yuya Nishihara committed bbd627a

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.

Comments (0)

Files changed (1)

pygments/lexers/dotnet.py

                 (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),