Markdown Cheatsheet
Summary
Horizontal Rules §
[Markup]
---
[Result]
Typographic replacements §
[Markup]
(c) (C) (r) (R) (tm) (TM) (p) (P) +-
test.. test... test..... test?..... test!....
!!!!!! ???? ,, -- ---
"Double quotes" and 'single quotes'
[Result]
© © ® ® ™ ™ § § ±
test… test… test… test?.. test!..
!!! ??? , – —
“Double quotes” and ‘single quotes’
Emphasis §
[Markup]
**This is bold text**
__This is bold text__
*This is italic text*
_This is italic text_
~~Strikethrough~~
[Result]
This is bold text
This is bold text
This is italic text
This is italic text
Strikethrough
Blockquotes §
[Markup]
> Blockquotes can also be nested...
>> By using additional greater-than signs right next to each other...
> > > Or with spaces between arrows.
[Result]
Blockquotes can also be nested…
By using additional greater-than signs right next to each other…
Or with spaces between arrows.
Lists §
Unordered
[Markup]
- Create a list by starting a line with `+`, `-`, or `*`
- Sub-lists are made by indenting 2 spaces:
- Marker character change forces new list start:
- Ac tristique libero volutpat at
* Facilisis in pretium nisl aliquet
+ Nulla volutpat aliquam velit
* Very...
+ Easy!
[Result]
- Create a list by starting a line with
+
,-
, or*
- Sub-lists are made by indenting 2 spaces:
- Marker character change forces new list start:
- Ac tristique libero volutpat at
- Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
- Marker character change forces new list start:
- Very…
- Easy!
Ordered
[Markup]
1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa
1) You can use sequential numbers...
1) ...or keep all the numbers as `1.`
[Result]
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
- You can use sequential numbers…
- …or keep all the numbers as
1.
Start numbering with offset:
[Markup]
57. foo
1. bar
[Result]
- foo
- bar
To-Do list (by markdown-it-todo — see it in the Plugins section)
[Markup]
- [ ] List item
- [x] Do the thing
[Result]
- List item
- Do the thing
Code §
Inline code
[Markup]
Some text and `code` here...
[Result]
Some text and code
here…
Indented code
[Markup]
// Some comments
line 1 of code
line 2 of code
line 3 of code
[Result]
// Some comments
line 1 of code
line 2 of code
line 3 of code
Block code "fences"
[Markup]
```
Sample text here...
```
[Result]
Sample text here...
Syntax highlighting (by markdown-it-highlightjs — see it in plugins section)
[Markup]
```js
var foo = function (bar) {
return bar++;
};
console.log(foo(5));
```
[Result]
var foo = function (bar) {
return bar++;
};
console.log(foo(5));
Tables §
[Markup]
| Option | Description |
| ------ | ------------------------------------------- |
| data | data that will be passed into templates. |
| engine | engine to be used for processing templates. |
| ext | extension to be used for dest files. |
[Result]
Option | Description |
---|---|
data | data that will be passed into templates. |
engine | engine to be used for processing templates. |
ext | extension to be used for dest files. |
Right aligned columns
[Markup]
| Option | Description |
| -----: | ------------------------------------------: |
| data | data that will be passed into templates. |
| engine | engine to be used for processing templates. |
| ext | extension to be used for dest files. |
[Result]
Option | Description |
---|---|
data | data that will be passed into templates. |
engine | engine to be used for processing templates. |
ext | extension to be used for dest files. |
SmartyPants converts ASCII punctuation characters into “smart” typographic punctuation HTML entities. For example:
[Markup]
| | ASCII | HTML |
| ---------------- | ------------------------------- | ----------------------------- |
| Single backticks | `'Isn't this fun?'` | 'Isn't this fun?' |
| Quotes | `"Isn't this fun?"` | "Isn't this fun?" |
| Dashes | `-- is en-dash, --- is em-dash` | -- is en-dash, --- is em-dash |
[Result]
ASCII | HTML | |
---|---|---|
Single backticks | 'Isn't this fun?' |
‘Isn’t this fun?’ |
Quotes | "Isn't this fun?" |
“Isn’t this fun?” |
Dashes | -- is en-dash, --- is em-dash |
– is en-dash, — is em-dash |
Links §
[Markup]
[link text](http://dev.nodeca.com)
[link with title](http://nodeca.github.io/pica/demo/ "title text!")
Autoconverted link https://github.com/nodeca/pica
[Result]
link text
link with title
Autoconverted link https://github.com/nodeca/pica (via linkify option in markdown-it)
Images §
Like links, Images also have a footnote style syntax
[Markup]


[Result]
Plugins §
This blog uses the following plugins from markdown-it:
- markdown-it-anchor
- markdown-it-block-embed
- markdown-it-deflist
- markdown-it-emoji
- markdown-it-footnote
- markdown-it-highlightjs
- markdown-it-imsize
- markdown-it-katex
- markdown-it-mark
- markdown-it-mermaid
- markdown-it-sub
- markdown-it-sup
- markdown-it-toc-done-right
- markdown-it-todo
You can find more in markdown-it-plugin.
Emojies §
All github supported emojis using markdown-it-emoji
[Markup]
> Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:
> Shortcuts (emoticons): :-) :-( 8-) ;)
[Result]
Classic markup: 😉 :crush: 😢 :tear: 😆 😋
Shortcuts (emoticons): 😃 😦 😎 😉
Subscript / Superscript §
Subscript and Superscript based on pandoc definition supported by markdown-it-sub / markdown-it-sup.
[Markup]
19^th^
H~2~O
[Result]
19th
H2O
Mark §
Supported by markdown-it-mark.
[Markup]
==Marked text==
[Result]
Marked text
Footnotes §
Supported by markdown-it-footnote.
[Markup]
Footnote 1 link[^first].
Footnote 2 link[^second].
Footnote 3 link[^3].
Inline footnote^[Text of inline footnote] definition.
Duplicated footnote reference[^second].
[^first]: Footnote **can have markup**
and multiple paragraphs.
[^second]: Footnote text.
[^3]: Footnote with numbered label
[Result]
Footnote 1 link[1].
Footnote 2 link[2].
Footnote 3 link[3].
Inline footnote[4] definition.
Duplicated footnote reference[2:1].
Definition lists §
Supported by markdown-it-deflist.
[Markup]
Term 1
: Definition 1
with lazy continuation.
Term 2 with _inline markup_
: Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
Term 3
~ Definition 3
Term 4
~ Definition 4a
~ Definition 4b
[Result]
- Term 1
-
Definition 1
with lazy continuation. - Term 2 with inline markup
-
Definition 2
{ some code, part of Definition 2 }
Third paragraph of definition 2.
- Term 3
-
Definition 3
- Term 4
-
Definition 4a
-
Definition 4b
Table of Contents (TOC) §
Supported by markdown-it-toc-done-right
[Markup]
[toc]
[Result]
See the TOC in this page.
KaTeX §
LaTeX mathematical expressions using KaTeX:
[Markup]
The _Gamma function_ satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral
$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$
[Result]
The Gamma function satisfying is via the Euler integral
You can find more information about LaTeX mathematical expressions here.
Diagrams §
UML diagrams using Mermaid.
[Markup]
```mermaid
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.
Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
```
<br><br>
```mermaid
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```
[Result]
long time, so long
that the text does
not fit on a row. Bob-->Alice: Checking with John... Alice->John: Yes... John, how are you?