Formats that apply to one or more lines.
Any contiguous set of lines not formatted like one of the other formats below is treated as a paragraph. Paragraphs are separated by double blank lines.
Lorem ipsum dolor
sit amet.
New paragraph begins.
Lorem ipsum dolor sit amet.
New paragraph begins.
Class:
MDParagraphReaderHeaders are marked with one or more leading hashes.
# Header 1 has one hash
## Header 2 has two hashes
###### Up to header 6
## Optional Matched Hashes At The End ##
Header 1 has one hash
Header 2 has two hashes
Up to header 6
Optional Matched Hashes At The End
Alternately, H1 and H2 can be marked with underlines.
Header 1 underlined with equals
===============================
Header 2 with hyphens. Number of underline chars doesn't matter
---
Header 1 underlined with equals
Header 2 with hyphens. Number of underline chars doesn't matter
Classes:
MDUnderlinedHeadingReaderMDHashHeadingReaderUnordered lists are bulleted with an asterisk, plus, or hyphen and space.
* Item
+ Any of these
- Work as bullets
- Item
- Any of these
- Work as bullets
Lists can be nested with one or more spaces below an item.
* Item
* Sublist
* Sublist
* Item
- Item
- Sublist
- Sublist
- Item
Ordered lists start with a number, period, and space.
1. Item
2. Item
3. Item
- Item
- Item
- Item
Again, they can be nested.
1. Item
1. Subitem
2. Subitem
2. Item
- Item
- Subitem
- Subitem
- Item
The first number dictates where the numbering begins. The numbers on the other items are ignored and incremented by one.
5. Rendered as a 5
1. Rendered as a 6
1. Rendered as a 7
- Rendered as a 5
- Rendered as a 6
- Rendered as a 7
Numbering every item with 1. can
save you the hassle of renumbering items when reordering them.
Classes:
MDUnorderedListReaderMDOrderedListReaderBlockquotes enclose lengthy quoted content in an indented block.
Lorem Ipsum said:
> Dolor sit amet
> adipiscing.
Lorem Ipsum said:
Dolor sit amet adipiscing.
Class:
MDBlockQuoteReaderBlocks of preformatted code can be enclosed in triple backticks.
```
function foo() {
return 'bar';
}
```
function foo() { return 'bar'; }
Alternately, lines indented by at least four spaces or a tab character will be interpreted as code blocks.
function foo() {
return 'bar';
}
function foo() { return 'bar'; }
Classes:
MDFencedCodeBlockReaderMDIndentedCodeBlockReaderHorizontal divider lines are written as 3 or more hyphens or asterisks on a line by themselves, with or without interstitial whitespace.
---
***
- - - -
* * * * * * *
Class:
MDHorizontalRuleReaderTables consist of one header row and any number of body rows
Header | Row | Here
---------|-----|-----
Cell | 123 | xyz
Next row | 543 | abc
Header Row Here Cell 123 xyz Next row 543 abc
The pipe characters do not have to line up.
Rows can optionally have leading and/or trailing pipes. This is required for a single column table.
| One column |
| --- |
| 123 |
| 234 |
One column 123 234
Columns can be right, center, or left aligned with colons in the divider line.
| Left | Center | Right |
| :--- | :----: | ----: |
| 1 | 2 | 3 |
Left Center Right 1 2 3
Tables can optionally support simple spreadsheet expressions by adding the spreadsheet block reader when configuring a parser.
Classes:
MDTableReaderMDSpreadsheetReaderDefinition lists show terms with definitions below them. Useful for glossaries.
term
: definition of term
another
: definition of another
: alternate definition of another
- term
- definition of term
- another
- definition of another
- alternate definition of another
Class:
MDDefinitionListReaderAbbreviations can be defined anywhere in the document. Anywhere that abbreviation appears in the document will have a mouseover title showing the expanded definition. The definition is plaintext only (no markdown).
Always remember, ABC.
*[ABC]: Always Be Closing
Always remember, ABC.
Class:
MDAbbreviationReaderMany block structures can be modified with CSS classes, IDs, or other simple HTML attributes inside curly braces.
## Header with a CSS class {.mycssclass}
--- {#mydividerid}
| Table | {style=color:green;}
|---|
|123|
## Header with multiple modifiers {.linkclass #linkid lang=en}
Header with a CSS class
Table 123 Header with multiple modifiers
Class:
MDModifierReaderFormats that apply within a block to style runs of words or inject other content within text.
Text can be marked as bold by enclosing it in double asterisks.
Some **bold** text. Can also use __underscores__ (unless underlining is enabled).
Some bold text. Can also use underscores (unless underlining is enabled).
Class:
MDStrongReaderText can be marked as italic by enclosing it in single underscores or single asterisks.
Some _italic_ text. Can also use *asterisks*.
Some italic text. Can also use asterisks.
Class:
MDEmphasisReaderText can be stricken out using tildes, singly or in pairs. If subscript is enabled then only double tildes can be used.
Not ~~this text~~. Not ~this text~ either.
Not
this text. Notthis texteither.
Class:
MDStrikethroughReaderUnderline is denoted with double underscores. If this reader is in use, “strong” styling can only be done with double asterisks.
Some __underlined__ text.
Some underlined text.
Class:
MDUnderlineReaderHighlighting is done with pairs of equals around text.
Some ==highlighted== text.
Some highlighted text.
Class:
MDHighlightReaderWords can be rendered in monospace font using single backticks.
The name of the function is `foo()`.
The name of the function is
foo().
Class:
MDCodeSpanReaderSubscript is denoted with single tildes around the text.
The formula for water is H~2~O.
The formula for water is H2O.
Class:
MDSubscriptReaderSuperscript is represented with caret characters around the text.
Einstein's equation E=mc^2^.
Einstein’s equation is E=mc2.
Class:
MDSuperscriptReaderLinking to a document is done with marked text and a URL.
Click [here](page.html).
Click here.
An optional mouseover title can be added to the link after the URL.
Click [here](page.html "Goes to a neat page").
Click here.
Repetitive or lengthy URLs can be referenced out and defined elsewhere in the document.
Click [here][foo] or [here][foo] or [even here][foo] to go to the same place.
[foo]: page.html "Optional title"
Lastly, to make a link with the URL as the link text, you can use angle brackets.
Go visit <page.html>.
Go visit page.html.
Classes:
MDLinkReaderMDReferencedLinkReaderAn image is similar to link syntax with an exclamation in front. Instead of clickable link text, the text is alt text for the image.

Images also support title attributes.

Images also support referenced URLs.
![alt text][foo]
[foo]: https://picsum.photos/100/75
Images can be made clickable by enclosing them in a link where the link text goes.
[](page.html)
Classes:
MDImageReaderMDReferencedImageReaderFootnotes can be inserted into text. The text of the footnotes is added to the bottom of the document, regardless of where they’re defined.
Lorem ipsum[^1] dolor sit[^2] amet.
[^1]: Further information here
[^2]: See _Interesting Book_, pg 213
Class:
MDFootnoteReaderCurrently all HTML tags and attributes are permitted, when markdown syntax doesn’t do what you want.
Class:
MDHTMLTagReader