no-multiple-link-space
🎨 Stylistic
🔧 Fixable
⭐ CommonMark
🌟 GFM
Disallow multiple spaces around link text.
Rule Details
This rule disallows spaces or tabs at the start and end of inline and reference link text.
Link text is defined as the content between square brackets. Consistent spacing around link text makes Markdown sources easier to read.
It ignores autolinks, images, and multiline link text, allows internal spaces, and avoids fixes that would break links.
Examples
❌ Incorrect
Examples of incorrect code for this rule:
Default
md
<!-- eslint md/no-multiple-link-space: 'error' -->
[ ESLint ](https://eslint.org)
[ESLint ](https://eslint.org)
[ ESLint ](https://eslint.org)
[ESLint\ ](https://eslint.org)
[ ESLint ][eslint]
[eslint]: https://eslint.org✅ Correct
Examples of correct code for this rule:
Default
md
<!-- eslint md/no-multiple-link-space: 'error' -->
[ESLint](https://eslint.org)
[
ESLint
](https://eslint.org)
[ESLint
](https://eslint.org)
<https://eslint.org>
[The ESLint website](https://eslint.org)
[ESLint][eslint]
[eslint]: https://eslint.org

- [x ] details
[x]: https://eslint.orgOptions
No options are available for this rule.
Fix
This rule fixes the link text by removing the spaces and tabs next to the brackets.