tsawada/iwiwiki — pull request #2 by zvass (2011-12-07 11:26:26+00:00)
Title: Syntax highlighting added

Important:
~~~~~~~

In the python script "iwiwiki" I had to change the first line as follows:

#!/usr/bin/env python -> #!/usr/bin/env python2

That's because the command 'python' refers to python 3.x and 'python2' refers to python 2.7 in Arch Linux. Please test if 'python2' works in your environment. It may worth changing it for compatibility reasons.

Syntax highlighting:
~~~~~~~~~~~~~~

Implemented syntax highlighting using "fenced code blocks"[1] and Pygments. For usage and notes see the appropriate page under Features. The CSS is not copied from Pygment yet so the output is not coloured, but the HTML is generated well.

Unfortunately there seems to be a limitation or bug (hope it's the latter one) somewhere in the "fenced code block" implementation, regarding nesting lines of tildes inside code blocks, which messes up the parser. I will look into it in the next iteration.

[1] http://freewisdom.org/projects/python-markdown/Fenced_Code_Blocks

Cheers!