Skip to content

Commit

Permalink
fix: Chinese file link build failed (#425)
Browse files Browse the repository at this point in the history
fix #424
  • Loading branch information
fuchunhui authored Jan 6, 2022
1 parent a3bf52f commit ae029ae
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/node/markdownToVue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ export function createMarkdownToVueRenderFn(
for (let url of data.links) {
url = url.replace(/[?#].*$/, '').replace(/\.(html|md)$/, '')
if (url.endsWith('/')) url += `index`
const resolved = slash(
url.startsWith('/')
? url.slice(1)
: path.relative(srcDir, path.resolve(dir, url))
const resolved = decodeURIComponent(
slash(
url.startsWith('/')
? url.slice(1)
: path.relative(srcDir, path.resolve(dir, url))
)
)
if (
!pages.includes(resolved) &&
Expand Down

0 comments on commit ae029ae

Please sign in to comment.