Skip to content
Crozzers edited this page Jul 11, 2022 · 2 revisions

use-file-vars extra

The use-file-vars extra allows for other extras to be enabled via an Emacs-style File Variable line inside the Markdown text. The syntax for File Variables is documented at the Specifying File Variables page of the GNU Emacs Manual. For example, the following line in the Markdown text will enable the code-friendly and the footnotes extras:

-*- markdown-extras: code-friendly, footnotes -*-

The same effect is achieved with this multi-line definition:

<!--
Local Variables:
markdown-extras: code-friendly, footnotes
End:
-->

command-line usage

$ python markdown2.py -x use-file-vars FOO.txt

module usage

>>> markdown2.markdown(text, extras=["use-file-vars"])

(Return to Extras page.)

Clone this wiki locally