diff --git a/functions/bot/components/translate.ts b/functions/bot/components/translate.ts index 04e3802..d8d6251 100644 --- a/functions/bot/components/translate.ts +++ b/functions/bot/components/translate.ts @@ -60,7 +60,8 @@ export const translate = async function handler( let content = res.content[0]! as TextBlock; let txt = content.text; // certain markdown characters break telegram https://stackoverflow.com/a/71313944 - return JSON.parse(txt.replace("\n\n", "")) + return txt + .replace("\n\n", "") .replace(/\_/g, "\\_") .replace(/\*/g, "\\*") .replace(/\[/g, "\\[")