From 11bbec1392ddf3b67358bb5fad7f245741e0e572 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= Date: Thu, 25 Apr 2024 10:21:25 -0300 Subject: [PATCH] Changes on regex --- .../components/chat/chat-graphql/chat-message-form/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-form/service.ts b/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-form/service.ts index 96cccca942..bb7a4be7f6 100644 --- a/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-form/service.ts +++ b/bigbluebutton-html5/imports/ui/components/chat/chat-graphql/chat-message-form/service.ts @@ -1,7 +1,7 @@ export const textToMarkdown = (message: string) => { const parsedMessage = message || ''; - const CODE_BLOCK_REGEX = /```\w+[\r\n\s]+([\s\S]*?)\n```/; + const CODE_BLOCK_REGEX = /```([\s\S]*?)```/g; const isCode = parsedMessage.search(CODE_BLOCK_REGEX); // regular expression to match urls