diff --git a/packages/client/src/tiptap/services/markdown/index.tsx b/packages/client/src/tiptap/services/markdown/index.tsx index eea2412a..393ab3af 100644 --- a/packages/client/src/tiptap/services/markdown/index.tsx +++ b/packages/client/src/tiptap/services/markdown/index.tsx @@ -18,9 +18,9 @@ export * from './markdown-source-map'; const extractImage = (html) => { let matches = []; - while ((matches = html.match(/(?<=\)\(?=\<\/p\>)/g))) { - const source = html.match(/\\\<\/p\>/g)[0]; - html = html.replace(source, matches[0]); + while ((matches = html.match(/\\\<\/p\>/g))) { + const target = matches[0].match(//)[0]; + html = html.replace(matches[0], target); } return html;