1. Georg Brandl
  2. pygments-main

Commits

gbrandl  committed f6d8e06 Merge

merge with tim

  • Participants
  • Parent commits 495ef5f, 4062c29
  • Branches trunk

Comments (0)

Files changed (3)

File CHANGES

View file
  • Ignore whitespace
 - Fix a bug when backslashes are used in odd locations in Python (#395)
 
 - Fix various bugs in Matlab and S-Plus lexers, thanks to Winston Chang (#410,
-  #411, #413, #414)
+  #411, #413, #414) and fmarc (#419)
 
 
 Version 1.0

File pygments/lexers/math.py

View file
  • Ignore whitespace
             (r'[^\']*\'', String, '#pop')
         ],
         'deffunc': [
-            (r'(\s*)(.+)(\s*)(=)(\s*)(.+)(\()(.*)(\))(\s*)',
+            (r'(\s*)(?:(.+)(\s*)(=)(\s*))?(.+)(\()(.*)(\))(\s*)',
              bygroups(Text.Whitespace, Text, Text.Whitespace, Punctuation,
                       Text.Whitespace, Name.Function, Punctuation, Text,
                       Punctuation, Text.Whitespace), '#pop'),

File tests/examplefiles/matlab_noreturn

View file
  • Ignore whitespace
+ function myfunc(s)
+     a = 1;
+ end