fix html regex when generating editor output

This commit is contained in:
Ajay Bura 2023-10-29 15:17:08 +05:30
parent 07f9fa9d11
commit 6737661a86

View file

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