From 944ebe4acbe6fb21368cf1b28bf10e63ced7f9eb Mon Sep 17 00:00:00 2001 From: Shigma <33423008+Shigma@users.noreply.github.com> Date: Thu, 28 Mar 2019 00:47:46 +0800 Subject: [PATCH] fix($markdown-loader): always use `/` instead of `\` in `relPath` (#1484) --- packages/@vuepress/markdown-loader/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vuepress/markdown-loader/index.js b/packages/@vuepress/markdown-loader/index.js index 552ad652eb..196d9344b2 100644 --- a/packages/@vuepress/markdown-loader/index.js +++ b/packages/@vuepress/markdown-loader/index.js @@ -65,7 +65,7 @@ module.exports = function (src) { } = markdown.render(content, { loader, frontmatter: data, - relPath: path.relative(sourceDir, file) + relPath: path.relative(sourceDir, file).replace(/\\/g, '/') }) // check if relative links are valid