Skip to content

no-space-in-code

Markdownstyleno fixdefault: offmarkdown/markdownlint

Reports a code span that starts or ends with a space (` code `). A span whose content starts or ends with a backtick and is padded on both sides to separate it is not reported.

A renderer strips one space from each end only when both ends have one, so the spaces are lost or shown depending on the renderer. In code that shows the exact text (a command with a leading space) the difference matters, and elsewhere the spaces are noise.

To fix, delete the spaces inside the backticks.

Reported
A ` code` and `code ` and `code` span.
markdown:
lint:
rules:
no-space-in-code: warn # off (default), warn, error

Enabled by the presets: markdown/markdownlint.

Suppress one line with sudsy-disable-next-line no-space-in-code in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
markdownlint MD038 full