Fix regex to ignore html tag in editor output (#1515)
This commit is contained in:
parent
a2cbe79787
commit
a98903a85b
1 changed files with 1 additions and 1 deletions
|
@ -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 => {
|
const ignoreHTMLParseInlineMD = (text: string): string => {
|
||||||
if (text === '') return text;
|
if (text === '') return text;
|
||||||
const match = text.match(HTML_TAG_REG);
|
const match = text.match(HTML_TAG_REG);
|
||||||
|
|
Loading…
Reference in a new issue