Skip to content

no-reversed-links

Markdowncorrectnessno fixdefault: warnmarkdown/markdownlint

Reports link syntax written the wrong way round ((text)[url]), at the start of a paragraph or after whitespace, on the whole paragraph. No fix, because (text)[url] may be meant literally.

Markdown reads [text](url) as a link; with the brackets and parentheses swapped the text is shown as it is, with both pairs in it, and the link does not exist.

To fix, swap them: [text](url).

Reported
(Docs)[https://example.com] is reversed, [Docs](https://example.com) is not.
Text (with parentheses) and [brackets] stay.
markdown:
lint:
rules:
no-reversed-links: warn # off, warn (default), error

Enabled by the presets: markdown/markdownlint.

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

The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.

Tool Rule Match What differs
markdownlint MD011 partial Reported on the paragraph, not the link; a link followed by a reference [a](b)[c] is not told apart.