Skip to content

Markdown rules

Code fence style

MD048

Backticks style over tilde in code fences.

Before

~~~js
console.log("Hello, world!");
~~~

After

```js
console.log("Hello, world!");
```

Duplicate blank line

MD013

No more than one consecutive blank line.

Before

Foo


Bar

After

Foo

Bar

Heading style

MD003

ATX heading style over Setext.

Before

Big headline
============

After

# Big headline

Highlight style

MD049 MD050

Emphasis and styles use asterisks first. In nested hightlight, use any non-asterisk character as the outer style.

Before

Hello **_World_**

After

Hello __*World*__

Horizontal line style

MD035

Triple dash style over asterisk and underscore in horizontal lines.

Before

Foo

***

Bar

After

Foo

---

Bar

Ordered list spaces

The length of ordered list number and the following space should be even number.

Before

1. Foo
1. Bar
1. Baz

---

10.  Foo2
10.  Bar2
10.  Baz2

After

1.  Foo
1.  Bar
1.  Baz

---

10. Foo2
10. Bar2
10. Baz2

Ordered list style

Use lazy numbering in ordered lists. The prefix may start with any number, but the rest should follow the first one.

Before

1.  Foo
2.  Bar
3.  Baz

---

4.  Foo2
5.  Bar2
6.  Baz2

After

1.  Foo
1.  Bar
1.  Baz

---

4.  Foo2
4.  Bar2
4.  Baz2

Table style

MD055 MD056 MD060

Pipes are present with short column style. Exactly one space padding on each side of cell.

Before

Foo | Bar  | Baz
--- | ---- | ----
Qux | Quux | Quuz

After

| Foo | Bar | Baz |
| --- | --- | --- |
| Qux | Quux | Quuz |

Unnecessary blank lines in list

If no list item is expanded with a paragraph, remove blank lines between them. A blank line between one list item and a nested list is not checked.

Before

- Foo

- Bar

- Baz

After

- Foo
- Bar
- Baz

Unordered list style

MD004

Dash style over asterisk and plus in unordered lists.

Before

* Foo
+ Bar

After

- Foo
- Bar