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"/); });