Skip to content

Latest commit

 

History

History
25 lines (16 loc) · 905 Bytes

File metadata and controls

25 lines (16 loc) · 905 Bytes

TOP008 - Use backticks for fenced code blocks

Tags: code

Aliases: use-backticks-for-fenced-code-blocks

Fixable via script: Tildes replaced with backticks

This rule is triggered when a fenced code block uses tildes (~) as its delimiters instead of backticks (`). The rule applies regardless of whether three or four tildes are used.

~~~text
This fenced code block uses tildes, which will flag an error
~~~

```text
You should use backticks instead
```

Rationale

Consistent formatting makes it easier to understand a document.

Markdown lint's MD048 rule already covers this check, but does not include fix information, therefore can only be used to raise errors for manual fixing. This custom rule enforces the same style but includes fix information that can be used alongside our fix scripts.