diff --git a/lib/telegram.ts b/lib/telegram.ts index 7454c05..a981eb5 100644 --- a/lib/telegram.ts +++ b/lib/telegram.ts @@ -2,6 +2,7 @@ import { Bot } from "https://deno.land/x/grammy@v1.36.1/mod.ts"; import { TELEGRAM_API_KEY } from "@lib/env.ts"; import { transcribe } from "@lib/openai.ts"; import { createDocument } from "@lib/documents.ts"; +import { renderMarkdown } from "@lib/documents.ts"; const bot = new Bot(TELEGRAM_API_KEY); @@ -81,7 +82,7 @@ bot.command("end", async (ctx) => { await createDocument(task.noteName, finalNote, "text/markdown"); delete activeTasks[ctx.chat.id.toString()]; await ctx.reply("Note complete. Here is your markdown:"); - await ctx.reply(finalNote, { parse_mode: "MarkdownV2" }); + await ctx.reply(renderMarkdown(finalNote), { parse_mode: "HTML" }); } catch (error) { console.error("Error creating document:", error); await ctx.reply("Error creating document:");