Changes on regex
This commit is contained in:
parent
d8f6bb5327
commit
11bbec1392
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user