Commits

Anonymous committed 1afc43c

[svn] fixed small bugs in c# and python lexer

Comments (0)

Files changed (2)

pygments/lexers/agile.py

             (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
             (r'(from)(\s+)', bygroups(Keyword, Text), 'fromimport'),
             (r'(import)(\s+)', bygroups(Keyword, Text), 'import'),
-            (r'@[a-zA-Z0-9.]+', Name.Decorator),
+            (r'@[a-zA-Z0-9_]+', Name.Decorator),
             (r'(?<!\.)(__import__|abs|apply|basestring|bool|buffer|callable|'
              r'chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|'
              r'divmod|enumerate|eval|execfile|exit|file|filter|float|getattr|'

pygments/lexers/dotnet.py

             (r"'\\.'|'[^\\]'", String.Char),
             (r"[0-9](\.[0-9]*)?([eE][+-][0-9]+)?"
              r"[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?", Number),
-            (r'#\s+(if|endif|else|elif|define|undef|'
+            (r'#\s*(if|endif|else|elif|define|undef|'
              r'line|error|warning|region|endregion)', Comment.Preproc),
             (r'(abstract|case|as|base|break|case|catch|'
              r'checked|const|continue|default|delegate|'