MKD-EXTENSIONS(7)
β¨ MKD-EXTENSIONS β¨
okay bestie, so this is a page from the Miscellaneous Information Manual all about mkd-extensions β aka the Extensions to the Markdown text formatting syntax. it's the glow-up your regular markdown never knew it needed π
πΈ DESCRIPTION πΈ
so this version of markdown has been extended in a few ways, and honestly? she ate. the extensions came from three places: extending existing markup, creating brand-new markup from scratch, and borrowing markup from other markup languages. iconic behavior fr fr π
πΌοΈ Image dimensions
markdown's embedded images got an upgrade β you can now specify the dimensions of the image by adding a new argument =/height/x/width/ to the link description. yes, the dimensions go height first, then width, no cap.
the new image syntax is:

π pseudo-protocols
five pseudo-protocols have been added to links. five! a whole little squad π«Ά
id:β the alt text is marked up and written to the output, wrapped with<a id=id>and</a>.class:β the alt text is marked up and written to the output, wrapped with<span class=class>and</span>.raw:β the title is written β with no further processing β to the output. the alt text is discarded. (yeah, she's the chaotic one π)abbr:β the alt text is marked up and written to the output, wrapped with<abbr title=abbr>and</abbr>.lang:β the alt text s marked up and written to the output, wrapped with<span lang=lang>and</span>.
π Pandoc headers
the markdown source document can have a 3-line Pandoc header, formatted like:
% title
% author(s)
% date
and that whole thing gets made available to the mkd_doc_title(), mkd_doc_author(), and mkd_doc_date() functions. cute little metadata moment β¨
π Definition lists
a definition list item is defined as:
=tag=
description
(that is a =, followed by text, another =, a newline, 4 spaces of intent, and then more text.)
alternatively, definition list items are defined as:
tag
: description
(this is the format that PHP Markdown Extra uses.)
two ways to do the same thing? very "two moods" energy π
π¨ embedded stylesheets
stylesheets may be defined and modified in a <style> block. a style block is parsed like any other block level html; <style> starting on column 1, raw html (or, in this case, css) following it, and either ending with a </style> at the end of the line or a </style> at the beginning of a subsequent line.
β οΈ be warned that style blocks work like footnote links β no matter where you define them they are valid for the entire document. so like, no hiding your css in a corner, it's gonna apply everywhere bestie π
π€ alpha lists
alphabetic lists (like regular numeric lists, but with alphabetic items) are supported. so:
a. this
b. is
c. an alphabetic
d. list
will produce:
<ol type=a>
<li>this</li>
<li>is</li>
<li>an alphabetic</li>
<li>list</li>
</ol>
π tables
PHP Markdown Extra tables are supported; input of the form:
header|header
------|------
text | text
will produce:
<table>
<thead>
<tr>
<th>header</th>
<th>header</th>
</tr>
</thead>
<tbody>
<tr>
<td>text</td>
<td>text</td>
</tr>
</tbody>
</table>
the dashed line can also contain : characters for formatting; if a : is at the start of a column, it tells discount to align the cell contents to the left; if it's at the end, it aligns right, and if there's one at the start and at the end, it centers. alignment queen π
~~strikethrough~~
a strikethrough syntax is supported in much the same way that ` is used to define a section of code. if you enclose text with two or more tildes, such as ~~erased text~~, it will be written as <del>erased text</del>. like code sections, you may use as many ~ as you want, but there must be as many starting tildes as closing tildes. balance is everything, periodt π¦
π’ markdown extra-style footnotes
PHP Markdown Extra footnotes are supported. if a footnote link begins with a ^, the first use of that footnote will generate a link down to the bottom of the rendered document, which will contain a numbered footnote with a link back to where the footnote was called. it's giving little breadcrumb trail back home π
π AUTHOR
David Parsons http://www.pell.portland.or.us/~orc/
π SEE ALSO
markdown(1),markdown(3),mkd-callbacks(3),mkd-functions(3),mkd-line(3).- http://daringfireball.net/projects/markdown
- http://michelf.com/projects/php-markdown
and that's the whole page bestie!! this one's from the MASTODON manual, dated Dec 22, 2007 β yeah she's vintage but she's still serving πβ¨π
π¦ where this page comes from
- arch rolling: discount 3.0.2.0-1 Β· BSD-3-Clause
- debian bookworm: libmarkdown2-dev 2.2.7-2 Β· BSD-3-clause-like
- debian trixie: libmarkdown2-dev 2.2.7-2.1 Β· BSD-3-clause-like
- epel 10: discount 2.2.7-9.el10_0 Β· BSD
- epel 9: discount 2.2.4-7.el9 Β· BSD
- fedora 43: discount 2.2.7-12.fc43 Β· LicenseRef-Callaway-BSD
- fedora 44: discount 2.2.7-14.fc44 Β· LicenseRef-Callaway-BSD
- opensuse-leap 16.0: discount 3.0.0a-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: discount 3.0.0a-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: discount 3.0.0a-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: discount 3.0.0a-160000.2.2 Β· BSD-3-Clause
- ubuntu jammy: libmarkdown2-dev 2.2.7-2 Β· BSD-3-clause-like
- ubuntu noble: libmarkdown2-dev 2.2.7-2build1 Β· BSD-3-clause-like
- ubuntu questing: libmarkdown2-dev 2.2.7-2.1
- ubuntu resolute: libmarkdown2-dev 2.2.7-2.1build1 Β· BSD-3-clause-like
- ubuntu stonking: libmarkdown2-dev 2.2.7-2.1build1 Β· BSD-3-clause-like
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms