gfm.strikethrough
– Strike-through support¶
The gfm.strikethrough
module provides GitHub-like syntax for
strike-through text, that is text between double tildes:
some ~~strike-through'ed~~ text
Typical usage¶
import markdown
from gfm import StrikethroughExtension
print(markdown.markdown("I ~~like~~ love you!",
extensions=[StrikethroughExtension()]))
<p>I <del>like</del> love you!</p>
-
class
gfm.strikethrough.
StrikethroughExtension
(**kwargs)[source]¶ Bases:
markdown.extensions.Extension
An extension that adds support for strike-through text between two
~~
.-
extendMarkdown
(md)[source]¶ Add the various proccesors and patterns to the Markdown Instance.
This method must be overriden by every extension.
Keyword arguments:
- md: The Markdown instance.
- md_globals: Global variables in the markdown module namespace.
-
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.
-