Skip to content

Python-Markdown

A Python implementation of John Gruber’s Markdown with Extension support.

Extensions

Officially Supported Extensions

The extensions listed below are included with (at least) the most recent release and are officially supported by Python-Markdown. Any documentation is maintained here and all bug reports should be made to the project. If you have a typical install of Python-Markdown, these extensions are already available to you using the “Entry Point” name listed in the second column below.

Extension

Entry Point

Dot Notation

Extra

extra

markdown.extensions.extra

Abbreviations

abbr

markdown.extensions.abbr

Attribute Lists

attr_list

markdown.extensions.attr_list

Definition Lists

def_list

markdown.extensions.def_list

Fenced Code Blocks

fenced_code

markdown.extensions.fenced_code

#Footnotes

footnotes

markdown.extensions.footnotes

#Markdown in HTML

md_in_html

markdown.extensions.md_in_html

Tables

tables

markdown.extensions.tables

Admonition

admonition

markdown.extensions.admonition

CodeHilite

codehilite

markdown.extensions.codehilite

Legacy Attributes

legacy_attrs

markdown.extensions.legacy_attrs

Legacy Emphasis

legacy_em

markdown.extensions.legacy_em

Meta-Data

meta

markdown.extensions.meta

New Line to Break

nl2br

markdown.extensions.nl2br

Sane Lists

sane_lists

markdown.extensions.sane_lists

SmartyPants

smarty

markdown.extensions.smarty

Table of Contents

toc

markdown.extensions.toc

WikiLinks

wikilinks

markdown.extensions.wikilinks

Markdown in HTML

HTML TAG 를 사용하면 Markdown Syntax 가 모두 Disable 되고 Plain Text 로 출력된다. 모두 분석되도록 하기 위해서 이 확장을 1 로 만들면 된다.

<div markdown="1">
This is a *Markdown* Paragraph.
</div>

Footnotes

Options

  • PLACE_MARKER - A text string used to mark the position where the footnotes are rendered. Defaults to ///Footnotes Go Here///. If the place marker text is not found in the document, the footnote definitions are placed at the end of the resulting HTML document.
  • UNIQUE_IDS - Whether to avoid collisions across multiple calls to reset(). Defaults to False.
  • BACKLINK_TEXT - The text string that links from the footnote definition back to the position in the document. Defaults to .
  • SUPERSCRIPT_TEXT - The text string that links from the position in the document to the footnote definition. Defaults to {}, i.e. only the footnote’s number.
  • BACKLINK_TITLE - The text string for the title HTML attribute of the footnote definition link. The placeholder {} will be replaced by the footnote number. Defaults to Jump back to footnote {} in the text.
  • SEPARATOR - The text string used to set the footnote separator. Defaults to :.
  • USE_DEFINITION_ORDER - Whether to order footnotes by the occurrence of footnote definitions in the document. Defaults to False.

See also

Favorite site