Reputation: 3484
I'm having a problem here: i'm building out a simple blog, and I'm using markdown, pygments and django to do so.
My content is in markdown and I wish to code-highlight it. It works fine, except markdown, is not respecting the indentation of python code.
Here's a screenshot
And here's a screenshot of the content in django admin:
Also, the code for rendering in the template:
<div class="row">
<div class="span12 vertical-spacer">
{{ object.body|markdown:"safe,codehilite"|render_inlines|safe }}
</div>
</div>
Upvotes: 0
Views: 584
Reputation: 599480
I had this problem ages ago when trying to use the Mingus blog app, which uses Markdown and pygments. The issue appears to stem from the use of the render_inlines
filter, although I'm not entirely sure why. I wasn't using that particular functionality, so I removed it from the template.
Upvotes: 1