Exclude empty links from md results (#153161)

These are technically valid links but we don't care about them since they take up no space
This commit is contained in:
Matt Bierner
2022-06-24 14:42:00 -07:00
committed by GitHub
parent f8663bce69
commit 8acfd0ae60
2 changed files with 12 additions and 1 deletions

View File

@@ -219,7 +219,7 @@ const linkPattern = new RegExp(
r`\(\s*)` + // <-- close prefix match
/**/r`(` +
/*****/r`[^\s\(\)\<](?:[^\s\(\)]|\([^\s\(\)]*?\))*|` + // Link without whitespace, or...
/*****/r`<[^<>]*>` + // In angle brackets
/*****/r`<[^<>]+>` + // In angle brackets
/**/r`)` +
// Title