diff --git a/scripts/ci/plan.mjs b/scripts/ci/plan.mjs index c2ba61e31..2d68d60c7 100644 --- a/scripts/ci/plan.mjs +++ b/scripts/ci/plan.mjs @@ -176,7 +176,7 @@ if (tier === "reused") { ) { selected.docs = true; // Authored documentation code also belongs to the static checkers. - selected.code ||= /^docs\/.*\.(?:[cm]?[jt]s|[jt]sx)$/u.test(file); + selected.code ||= /^docs\/.*\.(?:[cm]?[jt]s|[jt]sx)$/su.test(file); selected.website ||= matchesAny(file, SCOPES.website); continue; } diff --git a/tests/boundary/filesystem/ciChangeScope.test.ts b/tests/boundary/filesystem/ciChangeScope.test.ts index 3e05ca7be..a80f2037a 100644 --- a/tests/boundary/filesystem/ciChangeScope.test.ts +++ b/tests/boundary/filesystem/ciChangeScope.test.ts @@ -176,6 +176,17 @@ it("retains code checks when documentation code is removed or renamed to Markdow }); }); +it("selects code checks for documentation filenames containing line breaks", async () => { + const { directory, base } = await fixture(); + const head = await change(directory, ["docs/.vitepress/navigation\nmenu.ts"]); + expect(await classify(directory, base, head)).toMatchObject({ + code: true, + docs: true, + runtime: false, + package: false, + }); +}); + it.each([ "job-timings.mjs", "job-timings-batch.mjs",