#[non_exhaustive]pub enum Extension {
Show 77 variants
Smart,
Strikeout,
Superscript,
Subscript,
PipeTables,
Footnotes,
TaskLists,
Autolink,
TexMathDollars,
FencedDivs,
BracketedSpans,
HardLineBreaks,
RawHtml,
HeaderAttributes,
FencedCodeAttributes,
InlineCodeAttributes,
LinkAttributes,
Attributes,
DefinitionLists,
GridTables,
MultilineTables,
SimpleTables,
TableCaptions,
LineBlocks,
FancyLists,
ExampleLists,
Startnum,
YamlMetadataBlock,
PandocTitleBlock,
AutoIdentifiers,
GfmAutoIdentifiers,
AsciiIdentifiers,
MmdHeaderIdentifiers,
ImplicitHeaderReferences,
ImplicitFigures,
RawAttribute,
InlineNotes,
NativeDivs,
NativeSpans,
MarkdownInHtmlBlocks,
MarkdownAttribute,
RawTex,
Citations,
TableAttributes,
BlankBeforeBlockquote,
BlankBeforeHeader,
Mark,
Emoji,
Alerts,
TexMathSingleBackslash,
TexMathDoubleBackslash,
FencedCodeBlocks,
BacktickCodeBlocks,
TexMathGfm,
EscapedLineBreaks,
IntrawordUnderscores,
ListsWithoutPrecedingBlankline,
Abbreviations,
AllSymbolsEscapable,
AngleBracketsEscapable,
EastAsianLineBreaks,
FourSpaceRule,
Gutenberg,
IgnoreLineBreaks,
LatexMacros,
LiterateHaskell,
MmdLinkAttributes,
MmdTitleBlock,
OldDashes,
RawMarkdown,
RebaseRelativePaths,
ShortSubsuperscripts,
ShortcutReferenceLinks,
SpaceInAtxHeader,
SpacedReferenceLinks,
WikilinksTitleAfterPipe,
WikilinksTitleBeforePipe,
}Expand description
A single format extension. Each variant’s position in Extension::ALL is its bit
index in Extensions.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Smart
Straight quotes, ..., --, and --- become curly quotes, an ellipsis, and en/em dashes.
Strikeout
~~text~~ strikeout spans.
Superscript
^text^ superscript spans.
Subscript
~text~ subscript spans.
PipeTables
Pipe tables: |-separated cells with a delimiter row carrying the column alignments.
Footnotes
[^label] footnote references with separately defined note bodies.
TaskLists
- [ ] / - [x] task-list items.
Autolink
A bare absolute URI or www. address in running text becomes a link.
TexMathDollars
$…$ inline and $$…$$ display math.
FencedDivs
:::-fenced divs carrying an attribute block or a bare class name.
BracketedSpans
[text]{.class} spans: bracketed text followed by an attribute block.
HardLineBreaks
Every newline within a paragraph is a hard line break.
RawHtml
Raw HTML tags and blocks are carried through rather than treated as text.
HeaderAttributes
A {#id .class key=val} attribute block on a header line.
FencedCodeAttributes
An attribute block on a fenced code block’s opening line.
InlineCodeAttributes
An attribute block after an inline code span.
LinkAttributes
An attribute block after a link or image.
Attributes
The combined attribute toggle: the attribute syntaxes enabled as a group.
DefinitionLists
Definition lists: a term line followed by :-marked definition blocks.
GridTables
Grid tables drawn with +---+ cell borders.
MultilineTables
Multiline tables, whose cells may continue across several source lines.
SimpleTables
Simple tables: columns aligned under a dashed header line.
TableCaptions
A Table: (or bare :) caption line attached to a table.
LineBlocks
|-prefixed line blocks, preserving the source’s line divisions.
FancyLists
Ordered-list markers beyond decimal numbers: letters, roman numerals, and ) delimiters.
ExampleLists
(@label) example lists, numbered sequentially across the whole document.
Startnum
An ordered list starts at the number its first marker carries rather than 1.
YamlMetadataBlock
A ----delimited YAML metadata block.
PandocTitleBlock
A %-prefixed title/author/date block at the top of the document.
AutoIdentifiers
A header without an explicit identifier gets one derived from its text.
GfmAutoIdentifiers
Derived header identifiers use the GitHub slug form: lowercased, punctuation dropped,
spaces to hyphens.
AsciiIdentifiers
Fold a derived identifier down to ASCII, dropping diacritics before the slug is formed.
MmdHeaderIdentifiers
A header’s explicit identifier is written in MultiMarkdown’s trailing [id] form rather
than the {#id} attribute block.
ImplicitHeaderReferences
A header’s own text works as a reference-link label for that header.
ImplicitFigures
A bare image with a caption becomes a figure.
RawAttribute
Raw passthrough: `code`{=fmt} inline and ```{=fmt} fenced blocks.
InlineNotes
A ^[…] inline note expands to a footnote in place.
NativeDivs
A block-level <div> becomes a Div, with Markdown parsed inside.
NativeSpans
An inline <span> becomes a Span, with Markdown parsed inside.
MarkdownInHtmlBlocks
Markdown is parsed inside block-level HTML, which is otherwise split tag-by-tag.
MarkdownAttribute
A <div>/<span> emitted for a div/span carries a data-markdown="1" marker so its
contents are still parsed as Markdown; this also forces a div with no native syntax into an
HTML wrap.
RawTex
Inline raw TeX (\command{…}, \begin{env}…\end{env}) passes through verbatim.
Citations
[@key] / @key citation references.
TableAttributes
An attribute block on a table’s caption line attaches to the table.
BlankBeforeBlockquote
A blank line is required before a blockquote, so one never interrupts a paragraph.
BlankBeforeHeader
A blank line is required before a header, so one never interrupts a paragraph.
Mark
==text== highlight spans.
Emoji
:name: emoji shortcodes.
Alerts
> [!NOTE]-style admonition blockquotes become classed divs.
TexMathSingleBackslash
\(…\) inline and \[…\] display math delimiters.
TexMathDoubleBackslash
\\(…\\) inline and \\[…\\] display math delimiters.
FencedCodeBlocks
Tilde-fenced (~~~) code blocks; with no fence form available, code is written in the
four-space indented form.
BacktickCodeBlocks
Backtick-fenced code blocks.
TexMathGfm
The GitHub math surface: inline $`…`$ and a ```math display block, as
opposed to the $…$/$$…$$ dollar form.
EscapedLineBreaks
A backslash at a line’s end is a hard line break, written as a trailing \; without it the
writer falls back to two trailing spaces.
IntrawordUnderscores
An underscore inside a word opens no emphasis, so the writer leaves intra-word _ literal;
without it every _ is escaped so a strict reader cannot start emphasis mid-word.
ListsWithoutPrecedingBlankline
A list may begin directly after a paragraph line with no intervening blank line, interrupting it; without it a list marker on the line after a paragraph folds into that paragraph.
Abbreviations
*[SHY]: Soft hyphen abbreviation definitions, applied to later occurrences of the term.
AllSymbolsEscapable
A backslash escapes any symbol, not only the ASCII-punctuation subset.
AngleBracketsEscapable
A backslash before < or > escapes the angle bracket.
EastAsianLineBreaks
Line breaks between East Asian wide characters carry no width and are dropped.
FourSpaceRule
An indented code block requires four spaces of indentation rather than one tab stop.
Gutenberg
Typographic conventions of the Project Gutenberg style for plain-text output.
IgnoreLineBreaks
Soft line breaks within a paragraph are discarded rather than kept as spaces.
LatexMacros
User-defined LaTeX macros are expanded in math and raw TeX.
LiterateHaskell
Bird-track (> ) literate-program code sections.
MmdLinkAttributes
An attribute block following a link or image in the MultiMarkdown position.
MmdTitleBlock
A MultiMarkdown metadata block at the top of the document.
OldDashes
- and -- map to en/em dashes under the older dash convention.
RawMarkdown
A raw block or inline may be written directly as Markdown for round-tripping.
RebaseRelativePaths
Relative paths in links and images are rebased onto the source file’s location.
ShortSubsuperscripts
~x / ^x subscript and superscript bind only the single following character.
ShortcutReferenceLinks
A defined label may be referenced by [label] alone, with no following [] or (…).
SpaceInAtxHeader
An ATX header requires a space between the opening # run and the heading text.
SpacedReferenceLinks
A reference link’s label and its following [id] may be separated by whitespace.
WikilinksTitleAfterPipe
[[target|title]] wiki links, with the title following the pipe.
WikilinksTitleBeforePipe
[[title|target]] wiki links, with the title preceding the pipe.