Skip to content

Markdown extensions

Dmitry Shachnev edited this page Jul 17, 2021 · 7 revisions

ReText supports Python-Markdown extensions.

Extra extension set is enabled by default. Math extension is enabled and can be used with the WebKit or WebEngine renderer. You can disable Extra and Math by adding remove_extra to the extensions list.

Enabling extensions for a particular document

The easiest way to enable additional extensions is listing their names (with options, if needed) in the first line of a document. For built-in extensions, you can use their short names (just foo instead of For example:

<!-- Required extensions: sane_lists, headerid(level=3) -->

Enabling extensions globally

  • If you want some extensions applied to all documents in a directory, list them in markdown-extensions.txt file in that directory.
  • If you want some extensions applied to all documents, list them in $HOME/.config/markdown-extensions.txt file. You can also use the “Markdown extensions” field in the Preferences dialog to edit that file.

In markdown-extensions.txt, extensions should be specified one on its own line, for example:


Third-party extensions

For third-party extensions, specify their full name that can be imported from Python, for example mypackage.mymodule.

All known third-party extensions are listed in Python-Markdown wiki.

If you want to get an experience similar to GitHub Flavored Markdown, take a look at the PyMdown Extensions’ GitHub-ish Configuration (see #369 for details on how to enable it).