gfm.hidden_hilite – Fenced code blocks with no highlighting

The gfm.hidden_hilite module provides an extension that allows the use of fenced code blocks without adding syntax highlighting or line numbers.

Typical usage

import markdown
from gfm import HiddenHiliteExtension

print(markdown.markdown("```\nimport this\nprint('foo')\n```",
                        extensions=[HiddenHiliteExtension()]))
<p><code>import this
print('foo')</code></p>
class gfm.hidden_hilite.HiddenHiliteExtension(*args, **kwargs)[source]

Bases: markdown.extensions.codehilite.CodeHiliteExtension

A subclass of CodeHiliteExtension that doesn’t highlight on its own.

getConfig(key, default='')

Return a setting for the given key or an empty string.

getConfigInfo()

Return all config descriptions as a list of tuples.

getConfigs()

Return all configs settings as a dict.

setConfig(key, value)

Set a config setting for key with the given value.

setConfigs(items)

Set multiple config settings given a dict or list of tuples.