no-space-in-code
What it does
Section titled “What it does”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.
Why it matters
Section titled “Why it matters”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.
Example
Section titled “Example”A ` code` and `code ` and `code` span.Configuration
Section titled “Configuration”markdown: lint: rules: no-space-in-code: warn # off (default), warn, errorEnabled 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.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| markdownlint | MD038 |
full |