Modify LLM HTML translation to also use DOM parser

This commit is contained in:
Yuhwan Kim
2024-06-02 05:10:58 +09:00
parent fe405c0ed2
commit 391295d15f

View File

@@ -238,10 +238,7 @@ export async function translateHTML(html: string, reverse:boolean, charArg:simpl
return html
}
}
if(db.translatorType === 'llm'){
const tr = db.translator || 'en'
return translateLLM(html, {to: tr})
}
const dom = new DOMParser().parseFromString(html, 'text/html');
console.log(html)