From f5ad51a35e5b21122ca40b7dd6723bff33d51edb Mon Sep 17 00:00:00 2001 From: code-october <148516338+code-october@users.noreply.github.com> Date: Sun, 29 Sep 2024 14:29:42 +0000 Subject: [PATCH] fix quoteEnd extract regex --- app/components/markdown.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index 6e340d065bc..7d27f1d60fa 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -252,7 +252,7 @@ function tryWrapHtmlCode(text: string) { }, ) .replace( - /(<\/body>)([\r\n\s]*?)(<\/html>)([\n\r]*?)([`]*?)([\n\r]*?)/g, + /(<\/body>)([\r\n\s]*?)(<\/html>)([\n\r]*)([`]*)([\n\r]*?)/g, (match, bodyEnd, space, htmlEnd, newLine, quoteEnd) => { return !quoteEnd ? bodyEnd + space + htmlEnd + "\n```\n" : match; },