From e8a491072cbb409163a4ecfcf79bd4a645a620eb Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Sun, 15 Nov 2026 22:22:01 +0100 Subject: [PATCH] Let parseInt stop at a full folding's equals sign --- src/markdown/commonmark/case-folding.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/markdown/commonmark/case-folding.ts b/src/markdown/commonmark/case-folding.ts index ba3b18e..4f8ec97 100644 --- a/src/markdown/commonmark/case-folding.ts +++ b/src/markdown/commonmark/case-folding.ts @@ -62,8 +62,8 @@ for (const run of commonRuns.split(' ')) { } } for (const folding of fullFoldings.split(' ')) { - const equals = folding.indexOf('=') - foldings.set(String.fromCodePoint(parseInt(folding.slice(0, equals), 16)), codePoints(folding.slice(equals + 1))) + // parseInt stops at the `=`. + foldings.set(String.fromCodePoint(parseInt(folding, 16)), codePoints(folding.slice(folding.indexOf('=') + 1))) } export function foldCase(text: string): string {