fix: youdao dict

This commit is contained in:
Gabe
2025-10-04 22:29:03 +08:00
parent 7b2b48f0d1
commit e562f0b851
6 changed files with 50 additions and 22 deletions

View File

@@ -87,11 +87,12 @@ export default function FavWords() {
for (const word of wordList) {
try {
const data = await dict.apiFn(word);
const title = `## ${dict.reWord(data) || word}`;
const tran = dict
.toText(data)
.map((line) => `- ${line}`)
.join("\n");
tranList.push([`## ${word}`, tran].join("\n"));
tranList.push([title, tran].join("\n"));
} catch (err) {
kissLog("export translation", err);
}