From 1b0f44a969aab42de89b2ccae1194db230c313a7 Mon Sep 17 00:00:00 2001 From: DGCK81LNN <54282183+DGCK81LNN@users.noreply.github.com> Date: Wed, 24 Jan 2024 23:51:20 +0800 Subject: [PATCH] fix: just delete superscript digits from input instead of adding parens bc why --- src/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index fad0081..e469833 100644 --- a/src/index.ts +++ b/src/index.ts @@ -147,9 +147,7 @@ export function apply(ctx: Context, config: Config) { default: false, }) .replace(/(\s?)\ufdd0(\s?)/g, (_, l, r) => l + r || " ") - .replace(/[⁰¹²³⁴⁵⁶⁷⁸⁹]+/g, "\ufdd0$&\ufdd1") - .replace(/[⁽]?\ufdd0/g, "⁽") - .replace(/\ufdd1[⁾]?/g, "⁾") + .replace(/[⁰¹²³⁴⁵⁶⁷⁸⁹]+/g, "") hxTranscriber ||= new HanziToXdi8Transcriber() xhTranscriber ||= new Xdi8ToHanziTranscriber()