From 6737661a867054ab2d5acd011cb95784277890ad Mon Sep 17 00:00:00 2001 From: Ajay Bura <32841439+ajbura@users.noreply.github.com> Date: Sun, 29 Oct 2023 15:17:08 +0530 Subject: [PATCH] fix html regex when generating editor output --- src/app/components/editor/output.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/components/editor/output.ts b/src/app/components/editor/output.ts index 2d3e9c40..1fb2d590 100644 --- a/src/app/components/editor/output.ts +++ b/src/app/components/editor/output.ts @@ -69,7 +69,7 @@ const elementToCustomHtml = (node: CustomElement, children: string): string => { } }; -const HTML_TAG_REG = /<([\w-]+)(?:[^>]*)(?:(?:\/>)|(?:>.*?<\/\1>))/; +const HTML_TAG_REG = /<([\w-]+)(?:[^/>]*)(?:(?:\/>)|(?:>.*?<\/\1>))/; const ignoreHTMLParseInlineMD = (text: string): string => { if (text === '') return text; const match = text.match(HTML_TAG_REG);