Skip to content

Commit

Permalink
fix(link-plugin): remove redundant slash (#211)
Browse files Browse the repository at this point in the history
* fix(link-plugin): remove redundant slash

fix #205

* Update packages/saber/lib/markdown/link-plugin.js

Co-Authored-By: EGOIST <0x142857@gmail.com>
  • Loading branch information
kidonng and egoist committed May 25, 2019
1 parent dceb231 commit 3be3592
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/saber/lib/markdown/link-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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] ||
''}")`
Expand Down

0 comments on commit 3be3592

Please sign in to comment.