From 099d3468708895ba5d83654496cb901301efc3dd Mon Sep 17 00:00:00 2001 From: Shigma <33423008+Shigma@users.noreply.github.com> Date: Tue, 29 Jan 2019 17:45:36 +0800 Subject: [PATCH] fix: remove colon as separator (close: #1151) (#1236) --- packages/@vuepress/markdown/lib/snippet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/@vuepress/markdown/lib/snippet.js b/packages/@vuepress/markdown/lib/snippet.js index 834ff496a1..895e7b2d5f 100644 --- a/packages/@vuepress/markdown/lib/snippet.js +++ b/packages/@vuepress/markdown/lib/snippet.js @@ -24,7 +24,7 @@ module.exports = function snippet (md, options = {}) { const start = pos + 3 const end = state.skipSpacesBack(max, pos) const rawPath = state.src.slice(start, end).trim().replace(/^@/, root) - const filename = rawPath.split(/[{:\s]/).shift() + const filename = rawPath.split(/[{\s]/).shift() const content = fs.existsSync(filename) ? fs.readFileSync(filename).toString() : 'Not found: ' + filename const meta = rawPath.replace(filename, '')