mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
test(conformance): guard Malayalam heading links against joiner loss
Extend readmeConsistency.test.ts with a Malayalam case mirroring the existing Persian one, addressing the P2 review finding on #6383. The update heading's U+200C is written as an explicit escape so an editor cannot strip it invisibly; verified the test fails when the joiner is removed from README_ml.md. npm run test:local -- tests/conformance/readmeConsistency.test.ts passes 10/10. Supersedes #6383 (follow-up to #6731) Co-Authored-By: gensokyo-dev <gensokyo-dev@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
139edb2ec6
commit
1b10caed25
1 file changed
+21
@@ -87,6 +87,27 @@ describe("onboarding documentation product facts", () => {
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("preserves zero-width non-joiners in Malayalam links to GitHub-rendered headings", async () => {
|
||||
const malayalam = await readFile(
|
||||
resolve("docs/readme/README_ml.md"),
|
||||
"utf8",
|
||||
);
|
||||
// Confirmed against GitHub's rendered README, which retains U+200C. The
|
||||
// update heading keeps exactly one joiner between അപ and ഡേറ്റ്; an
|
||||
// editor that drops it from the heading or the fragment must fail here.
|
||||
const zeroWidthNonJoiner = "\u200c";
|
||||
for (const heading of [
|
||||
`REA അപ്${zeroWidthNonJoiner}ഡേറ്റ് ചെയ്യുക`,
|
||||
"എന്തൊക്കെ വിശകലനം ചെയ്യാം",
|
||||
"ഉദാഹരണങ്ങൾ",
|
||||
]) {
|
||||
expect(malayalam).toContain(`## ${heading}`);
|
||||
expect(malayalam).toContain(
|
||||
`](#${heading.toLowerCase().replaceAll(" ", "-")})`,
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe("published performance evidence", () => {
|
||||
|
||||
Reference in new issue
Block a user