From fdf0e419bbdf6d9fbdb3063a6ee453fd035fb32c Mon Sep 17 00:00:00 2001 From: Tuan Cao Date: Thu, 28 Apr 2022 17:17:44 +0700 Subject: [PATCH] Set default path for images --- lib/obsidian-image.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/obsidian-image.js b/lib/obsidian-image.js index fd9a3c0..45f9498 100644 --- a/lib/obsidian-image.js +++ b/lib/obsidian-image.js @@ -49,15 +49,12 @@ function convertTextNode(node) { const imageNode = { type: "image", //TODO: Use some kind of option to pass in default images path - url: encodeURI(match[1]), //encode white space from file name + url: encodeURI(`/images/${match[1]}`), //encode white space from file name alt: match[1], }; children.push(imageNode); - if (typeof match[0] !== "string") { - console.log("THE FUCK again") - } let matchEndIndex = match.index + match[0].length; startIndex = matchEndIndex; }