Skip to content

Commit

Permalink
fix pinyin
Browse files Browse the repository at this point in the history
  • Loading branch information
krmanik committed Apr 29, 2024
1 parent 7836d55 commit 251023b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pages/create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ export default function CreateDeck(): JSX.Element {

let pin = pinyin(word.trim(), { toneToNumber: true });
pin = pin.replace(/0/g, "5");

// replace v3 with u:3
pin = pin.replace(/v/g, "u:");

let pizh = await pinzhu.pinyinAndZhuyin(pin, "", "");

let pinyin1 = [decodeHtmlEntities(pizh[1])];
Expand Down

0 comments on commit 251023b

Please sign in to comment.