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
```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.