projects
/
rainny.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a2cbe79
)
Fix regex to ignore html tag in editor output (#1515)
author
Ajay Bura
<32841439+ajbura@users.noreply.github.com>
Sun, 29 Oct 2023 11:42:05 +0000
(22:42 +1100)
committer
GitHub
<noreply@github.com>
Sun, 29 Oct 2023 11:42:05 +0000
(22:42 +1100)
src/app/components/editor/output.ts
patch
|
blob
|
history
diff --git
a/src/app/components/editor/output.ts
b/src/app/components/editor/output.ts
index 1fb2d590ae33206b91f346b1b0b93b718fcafa5f..9a03604c18c2bd6eced70c135ca355ac76c0a004 100644
(file)
--- 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);