Changes on regex

This commit is contained in:
André 2024-04-25 10:21:25 -03:00
parent d8f6bb5327
commit 11bbec1392

View File

@ -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