fix(ci): handle line breaks in documentation paths

Co-authored-by: Kaoru0822 <208281322+kaoru0822-kitauji@users.noreply.github.com>
This commit is contained in:
N0zoM1z0 2026-10-14 03:50:50 +00:00
parent eeafead333
commit b6cba39c6b
2 changed files with 12 additions and 1 deletions

View File

@ -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;
}

View File

@ -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",