Skip to content

MD100 - Avoid likely unnecessary punctuation escapes in prose

Aliases: unnecessary-escape

This rule is opt-in and supports Standard, CommonMark, and GFM Markdown.

What this rule does

Reports a backslash before a dot, slash, or hyphen inside a word, and a backslash before a dot immediately following a Windows drive prefix. Markdown consumes these escapes during rendering, which may hide an intended literal backslash.

Examples

Incorrect

Use foo\.bar or a\/b.
Open D:\... to view the files.

Correct

Use foo.bar or a/b.
Open `D:\...` to view the files.

Syntactically meaningful escapes such as escaped emphasis markers, ordered-list markers, and escaped backslashes are left alone. Code, math, links, URLs, HTML blocks and tags, comments, potential reference labels, footnotes, and front matter are not checked.

This rule deliberately does not attempt to classify every punctuation escape. Other Markdown flavors are not checked.

Configuration

[global]
extend-enable = ["MD100"]

Automatic fixes

No automatic fix is offered. A backslash may have been intended as part of a path or technical expression. Removing it would conceal that mistake rather than correct it.