Skip to content

Commit

Permalink
feat: keep consistent for first
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoulixiang committed Nov 2, 2024
1 parent f9ac8a6 commit 7b648b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions lib/core/pinyin/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ export const middlewarePattern = (
break;
case "first":
list.forEach((item) => {
// todo: first 暂时不作为拼音一部分,不进行 isZh 识别
item.result = getFirstLetter(item.result);
});
break;
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/core/polyphonic/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7b648b0

Please sign in to comment.