Update MD039/no-space-in-links to fix reference-style links, be slightly more permissive matching link content.

This commit is contained in:
David Anson 2021-12-22 14:52:43 -08:00
parent 064a1e33e1
commit 7a76f1d22d
6 changed files with 163 additions and 2 deletions

View file

@ -4,7 +4,8 @@
const { addErrorContext, filterTokens } = require("../helpers");
const spaceInLinkRe = /\[(?:\s+(?:[^\]]*?)\s*|(?:[^\]]*?)\s+)](?=\(\S*\))/;
const spaceInLinkRe =
/\[(?:\s+(?:[^\]]*?)\s*|(?:[^\]]*?)\s+)](?=((?:\([^)]*\))|(?:\[[^\]]*\])))/;
module.exports = {
"names": [ "MD039", "no-space-in-links" ],