From a871219fd799b739f1bf7f755ae192134f32521a Mon Sep 17 00:00:00 2001 From: Astrian Zheng Date: Wed, 17 Apr 2024 21:39:11 +1000 Subject: [PATCH] Fix bug for no spacing before numbers --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index e33dafc..6647ebc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,7 +41,7 @@ function processText(node: Node, spacingCharacter: string): void { // if the char is chinese or japanese (kanji or kana) if (cnchar_and_kanji.test(textArr[i]) || kana.test(textArr[i])) { // if next char is english - if (/[a-zA-Z]/.test(textArr[i + 1])) { + if (english_and_number.test(textArr[i + 1])) { // 1/8 em space newText += textArr[i] + spacingCharacter } else {