From f59dab95e87a58c89246325264d997b909ea3b5b Mon Sep 17 00:00:00 2001 From: rain1201 <63438796+rain1201@users.noreply.github.com> Date: Thu, 9 May 2024 16:59:55 +0800 Subject: [PATCH] Update index.js Deal with Windows file path --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 894037f..2073198 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,7 @@ hexo.extend.filter.register('before_post_render', function(data){ data.content = data.content.replace(/!{1}\[([^\[\]]*)\]\((.*)\s?(?:".*")?\)/g, function(match_str, label, path){ + path=path.replaceAll("\\","/"); // if only one / if( (path.split("/")).length == 2){ console.debug("Markdown Image Path: " + match_str);