From 9defbfeb40357b1a7f5cc1527b59f1fead988fbf Mon Sep 17 00:00:00 2001 From: Grace Park Date: Tue, 21 May 2024 13:34:02 -0700 Subject: [PATCH] Bugfix: Allow no-empty-links rule to run properly (#50731) Co-authored-by: Peter Bengtsson --- src/content-linter/lib/linting-rules/internal-links-slash.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/content-linter/lib/linting-rules/internal-links-slash.js b/src/content-linter/lib/linting-rules/internal-links-slash.js index 6d44dd8b79ca..8a5c786a44eb 100644 --- a/src/content-linter/lib/linting-rules/internal-links-slash.js +++ b/src/content-linter/lib/linting-rules/internal-links-slash.js @@ -26,6 +26,8 @@ export const internalLinksSlash = { attr[1].startsWith(ignorePrefix), ), ) + // We can ignore empty links because MD042 from markdownlint catches empty links + .filter((attr) => attr[1] !== '') // Get the link path from the attribute .map((attr) => attr[1])