# Extend Pygments' DiffLexer using a non-standard comment (#) for literate diffing using pycco. # # The original diff can be found at [pygments-main.diff](pygments-main.diff) and can be applied # to an hg checkout of pygments-main using awk and patch: # # ``$ cat pycco.diff | awk '!/\#/' | patch -p1`` diff -r cfa0f44daad1 pygments/lexers/text.py --- a/pygments/lexers/text.py Fri Apr 29 14:03:50 2011 +0200 +++ b/pygments/lexers/text.py Sat Apr 30 20:28:56 2011 -0500 @@ -231,6 +231,7 @@ (r'@.*\n', Generic.Subheading), (r'([Ii]ndex|diff).*\n', Generic.Heading), (r'=.*\n', Generic.Heading), # Add non-standard diff comments. This has to go above the Text capture below # in order to be active. + (r'#.*\n', Comment), (r'.*\n', Text), ] }