mirror of
https://github.com/usememos/memos.git
synced 2025-10-09 22:06:53 +08:00
fix: get markdown image from backend (#581)
This commit is contained in:
parent
85db6721de
commit
e1e5121dd7
1 changed files with 6 additions and 4 deletions
|
@ -146,10 +146,12 @@ const Memo: React.FC<Props> = (props: Props) => {
|
|||
const imageUrls =
|
||||
memo.content.match(/!\[.*?\]\((.*?)\)/g)?.map(
|
||||
(item) =>
|
||||
item
|
||||
.match(/\((.*?)\)/g)
|
||||
?.slice(-1)[0]
|
||||
.slice(1, -1) ?? ""
|
||||
`/o/get/image?url=${
|
||||
item
|
||||
.match(/\((.*?)\)/g)
|
||||
?.slice(-1)[0]
|
||||
.slice(1, -1) ?? ""
|
||||
}`
|
||||
) ?? [];
|
||||
showPreviewImageDialog(
|
||||
imageUrls,
|
||||
|
|
Loading…
Add table
Reference in a new issue