mirror of
https://github.com/larvit/adf-codec.git
synced 2026-11-19 14:45:44 +01:00
Let parseInt stop at a full folding's equals sign
This commit is contained in:
@@ -62,8 +62,8 @@ for (const run of commonRuns.split(' ')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const folding of fullFoldings.split(' ')) {
|
for (const folding of fullFoldings.split(' ')) {
|
||||||
const equals = folding.indexOf('=')
|
// parseInt stops at the `=`.
|
||||||
foldings.set(String.fromCodePoint(parseInt(folding.slice(0, equals), 16)), codePoints(folding.slice(equals + 1)))
|
foldings.set(String.fromCodePoint(parseInt(folding, 16)), codePoints(folding.slice(folding.indexOf('=') + 1)))
|
||||||
}
|
}
|
||||||
|
|
||||||
export function foldCase(text: string): string {
|
export function foldCase(text: string): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user