Unverified Commit e1e5121d authored by Zeng1998's avatar Zeng1998 Committed by GitHub

fix: get markdown image from backend (#581)

parent 85db6721
...@@ -146,10 +146,12 @@ const Memo: React.FC<Props> = (props: Props) => { ...@@ -146,10 +146,12 @@ const Memo: React.FC<Props> = (props: Props) => {
const imageUrls = const imageUrls =
memo.content.match(/!\[.*?\]\((.*?)\)/g)?.map( memo.content.match(/!\[.*?\]\((.*?)\)/g)?.map(
(item) => (item) =>
item `/o/get/image?url=${
.match(/\((.*?)\)/g) item
?.slice(-1)[0] .match(/\((.*?)\)/g)
.slice(1, -1) ?? "" ?.slice(-1)[0]
.slice(1, -1) ?? ""
}`
) ?? []; ) ?? [];
showPreviewImageDialog( showPreviewImageDialog(
imageUrls, imageUrls,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment