Skip to content

Commit

Permalink
fix: remove colon as separator (close: #1151) (#1236)
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma authored and ulivz committed Jan 29, 2019
1 parent 19c21aa commit 099d346
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/@vuepress/markdown/lib/snippet.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '')

Expand Down

0 comments on commit 099d346

Please sign in to comment.