Skip to content
Crozzers edited this page Apr 27, 2023 · 4 revisions

code-color extra

REMOVED in version 2.4.7
DEPRECATED in version 1.3.0 Use the fenced-code-blocks extra instead. It has a cleaner syntax for specifying the language. The code-color extra will be removed from markdown2 in version 2.0 or so.

Allows syntax coloring of a code block by prefixing the code block with ':::LANG'. E.g.:

Some Python code:

    :::python
    if True:
        print "hi"

You must have the pygments Python module installed for this to work.

I was never that happy with the ':::LANG' syntax, so I'm happy to following GFM's better syntax lead with fenced-code-blocks.

(Return to Extras page.)

Clone this wiki locally