Skip to content

Commit

Permalink
Fix regex to ignore html tag in editor output (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajbura committed Oct 29, 2023
1 parent a2cbe79 commit a98903a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/components/editor/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a98903a

Please sign in to comment.