From 16cf639b80a3021b268264dad5d62f9eb13bd92f Mon Sep 17 00:00:00 2001 From: rot1024 Date: Mon, 10 Jun 2024 11:24:48 +0900 Subject: [PATCH] fix: image url is not correctly converted --- src/notion/markdown.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/notion/markdown.ts b/src/notion/markdown.ts index 40504dc..91d3741 100644 --- a/src/notion/markdown.ts +++ b/src/notion/markdown.ts @@ -89,7 +89,7 @@ export function transformMdImageBlock( if (block.type !== "image") return block; const imageMarkdown = block.parent; - const imageUrl = imageMarkdown.match(/!\[.*\]\((.*)\)/)?.[1]; + const imageUrl = imageMarkdown.match(/!\[.*?\]\((.+)\)/s)?.[1]; if (imageUrl) { const newUrl = fileUrlToAssetUrl(imageUrl, block.blockId); if (newUrl && newUrl !== imageUrl) {