Tag: pygments

Here you can see a listing of all the posts tagged with pygments on this website.

  • Syntax Highlighting in Markdown with Pygments

    Posted on June 18, 2008 at 23:20 +0200 Tagged with , ,

    If you want to get syntax highlighting using Pygments in Markdown texts, you have more or less 2 options. For one you can work on the HTML output of the Markdown2HTML converter of your choice, or you can try extending Markdown to offer special syntax for stuff you want to pass over to Pygments.

    A good idea if you want to go the first route is the use of some kind of HTML parsing library like BeautifulSoup as shown in this snippet and this article.

    This post will focus on the 2nd approach, though, since it is a bit cleaner :-)

    [more ...]

    0 comments