From 15a82582a057c6245ff481b56546fcd852059a77 Mon Sep 17 00:00:00 2001 From: Kid Date: Sat, 25 May 2019 10:23:13 +0800 Subject: [PATCH] Update packages/saber/lib/markdown/link-plugin.js Co-Authored-By: EGOIST <0x142857@gmail.com> --- packages/saber/lib/markdown/link-plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/saber/lib/markdown/link-plugin.js b/packages/saber/lib/markdown/link-plugin.js index 1b8b29dff..895902428 100644 --- a/packages/saber/lib/markdown/link-plugin.js +++ b/packages/saber/lib/markdown/link-plugin.js @@ -30,7 +30,7 @@ module.exports = function(md) { path.dirname(env.filePath), matched[1] ) - if (absolutePath.includes(env.pagesDir)) { + if (absolutePath.startsWith(env.pagesDir)) { link[0] = ':to' link[1] = `$saber.getPageLink("${matched[1]}", "${matched[2] || ''}")`