From 292ddd0d82f321ef7ae63fa4b2f146588a781fd5 Mon Sep 17 00:00:00 2001 From: Steve Gontzes Date: Mon, 18 May 2026 13:30:00 -0400 Subject: [PATCH] Fix MDX lint URL text false positives --- tools/mdx-lint/mdx-lint.mjs | 5 ----- tools/mdx-lint/mdx-lint.test.mjs | 13 +++++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/tools/mdx-lint/mdx-lint.mjs b/tools/mdx-lint/mdx-lint.mjs index 18e429f..936c31e 100644 --- a/tools/mdx-lint/mdx-lint.mjs +++ b/tools/mdx-lint/mdx-lint.mjs @@ -152,11 +152,6 @@ function validateTree(tree) { case "definition": validateUrlNode(node); break; - case "text": - if (containsDangerousUrl(node.value)) { - fail(node, "contains a dangerous URL scheme"); - } - break; } }); } diff --git a/tools/mdx-lint/mdx-lint.test.mjs b/tools/mdx-lint/mdx-lint.test.mjs index 4e687ed..329a5eb 100644 --- a/tools/mdx-lint/mdx-lint.test.mjs +++ b/tools/mdx-lint/mdx-lint.test.mjs @@ -44,6 +44,19 @@ Read the public setup guide at https://example.com/docs. `); }); + it("allows dangerous URL scheme names in plain prose", async () => { + await expectValid(` + + In the permissions section, choose the relevant permissions: + + To sync (read) data: + + - Project: Read + + +`); + }); + it("rejects unknown JSX components", async () => { await expectInvalid("\n", /disallowed JSX component "Unknown"/); });