fix: get markdown image from backend (#581)

pull/582/head^2
Zeng1998 2 years ago committed by GitHub
parent 85db6721de
commit e1e5121dd7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,

Loading…
Cancel
Save