fix: get markdown image from backend (#581)

This commit is contained in:
Zeng1998
2022-11-26 10:20:49 +08:00
committed by GitHub
parent 85db6721de
commit e1e5121dd7

View File

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