diff --git a/gramjs/extensions/markdownv2.ts b/gramjs/extensions/markdownv2.ts index bf394f3d..106db26e 100644 --- a/gramjs/extensions/markdownv2.ts +++ b/gramjs/extensions/markdownv2.ts @@ -16,7 +16,7 @@ export class MarkdownV2Parser { message = message.replace(/-(.*?)-/g, "$1"); // pre - message = message.replace(/```(.*?)```/g, "
$1"); + message = message.replace(/```([\s\S]*?)```/g, "
$1"); // code message = message.replace(/`(.*?)`/g, "
$1
");
@@ -35,6 +35,8 @@ export class MarkdownV2Parser {
/!\[([^\]]+)\]\(tg:\/\/emoji\?id=(\d+)\)/g,
'