djangosnippets.org: Latest snippets tagged with 'syntax-highlighting'http://djangosnippets.org/tags/syntax-highlighting/2007-03-19T22:25:24.364503-05:00Markdown and Syntax Highlighting in Django
2007-03-19T22:25:24.364503-05:00blinkshttp://djangosnippets.org/snippets/119/<p>This is a <a href="http://www.djangoproject.com/documentation/templates_python/#extending-the-template-system" title="Extending the template system">Django template tag</a> that renders an arbitrary block of text with Markdown and <a href="http://pygments.org" title="Syntax highlighter">Pygments</a>.</p>
<p>Use Markdown as usual, and when you have a code block to insert, put it inside <code>code</code> tags, with the language as the class:</p>
<p><code><code class='python'>print "Hello, World"</code></code></p>
<p>To use it in …</p>
Freely redistributable