Skip to content

Commit

Permalink
fix: image url is not correctly converted
Browse files Browse the repository at this point in the history
  • Loading branch information
rot1024 committed Jun 10, 2024
1 parent 259c7a8 commit 16cf639
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/notion/markdown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 16cf639

Please sign in to comment.