diff --git a/lib/core/pinyin/middlewares.ts b/lib/core/pinyin/middlewares.ts index 746332f..6adc745 100644 --- a/lib/core/pinyin/middlewares.ts +++ b/lib/core/pinyin/middlewares.ts @@ -95,7 +95,6 @@ export const middlewarePattern = ( break; case "first": list.forEach((item) => { - // todo: first 暂时不作为拼音一部分,不进行 isZh 识别 item.result = getFirstLetter(item.result); }); break; @@ -199,7 +198,7 @@ export const middlewareType = ( pinyin, initial, final, - first: item.isZh ? getFirstLetter(item.result) : "", + first: getFirstLetter(item.result), finalHead: head, finalBody: body, finalTail: tail, diff --git a/lib/core/polyphonic/index.ts b/lib/core/polyphonic/index.ts index af56e21..d0fe881 100644 --- a/lib/core/polyphonic/index.ts +++ b/lib/core/polyphonic/index.ts @@ -249,7 +249,7 @@ export const handleType = ( pinyin, initial, final, - first: item.isZh ? getFirstLetter(item.result) : '', + first: getFirstLetter(item.result), finalHead: head, finalBody: body, finalTail: tail,