Cheat sheet

Base syntax

Markdown Result

Emphasis

Weak
*text* _text_
Strong
**text** __text__
Weak

text text

String

text text

Code span

`text`

text

Paragraph

first paragraph

second paragraph

first paragraph

second paragraph

Autolink

<https://example.com/destination>

https://example.com/destination

Link

Inline
[label](https://example.com/destination)
Reference
[label][ref]

[ref]: https://example.com/destination

label

Image

Inline
![rust logo](rust-logo-151179464ae7ed46.svg)
Reference
![rust logo][ref]

[ref]: rust-logo-151179464ae7ed46.svg

rust logo

Thematic break

***

---

___

Heading

ATX style (h1-h6)

# H1
## H2
...
###### H6

Setext style (h1/h2 only)

H1
==

H2
--

H1

H2

Fenced code

```rust
fn main() {}
```

~~~rust
fn main() {}
~~~
fn main() {}

Indented code

••••fn main() {}
fn main() {}

Block quote

> Don't believe everything you
> read on the Internet.
>
> — Abraham Lincoln

Don't believe everything you read on the Internet.

— Abraham Lincoln

Numbered list

1. first
2. second
  1. first
  2. second

Bulleted list

- first
- second
* first
* second
+ first
+ second
  • first
  • second
  • first
  • second
  • first
  • second

Hard line break

a\
b••
c

a
b
c

GitHub-flavored Markdown

Markdown Result

Table

| header | row |
| ------ | --- |
| body   | row |
headerrow
bodyrow

Math

Inline
$2+2=4$
Display
$$x=\frac{-b\pm\sqrt{b^2-4ac} }{2a}$$
Inline

\(2+2=4\)

Display

\[x=\frac{ -b\pm\sqrt{b^2-4ac} }{2a}\]

Blockquote tags

> [!WARNING]
>
> Huh?

Huh?

Footnote

footnote [^reference]

[^reference]: definition

footnote [1]

[1]: definition

Strikethrough

~removed text~

~~also removed text~~

removed text

also removed text

Tasklist

- [ ] incomplete
- [x] complete
  • incomplete
  • complete

Other Extensions

Markdown Result

Metadata block

---
title: Cheat sheet
description: Sample syntax of all pulldown-cmark markdown extensions
---
titledescription
Cheat sheetSample syntax of all pulldown-cmark markdown extensions

Heading attributes

# Custom heading {.red #custom-heading}

Custom heading