From fe571046c705bab19e37387da10a5c58eaddf0a6 Mon Sep 17 00:00:00 2001 From: oldwinter Date: Tue, 29 Sep 2026 20:37:15 +0200 Subject: [PATCH] fix: read tracked paths without Git quoting --- scripts/test-markdown-links.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/test-markdown-links.mjs b/scripts/test-markdown-links.mjs index 93c7d894..640744f3 100644 --- a/scripts/test-markdown-links.mjs +++ b/scripts/test-markdown-links.mjs @@ -7,8 +7,11 @@ import { fileURLToPath } from "node:url"; const root = join(dirname(fileURLToPath(import.meta.url)), ".."); -const files = execFileSync("git", ["ls-files", "*.md"], { cwd: root, encoding: "utf8" }) - .split("\n") +const files = execFileSync("git", ["ls-files", "-z", "--", "*.md"], { + cwd: root, + encoding: "utf8", +}) + .split("\0") .filter(Boolean); // Remove fenced code blocks and inline code spans while keeping line numbers.