mirror of
https://github.com/zhigang1992/docsify.git
synced 2026-04-24 05:06:08 +08:00
fix(util): fix crash, fixed #154
This commit is contained in:
@@ -54,5 +54,7 @@ export const getParentPath = cached(path => {
|
||||
})
|
||||
|
||||
export const cleanPath = cached(path => {
|
||||
return path.replace(/([^:])\/{2,}/g, '$1/')
|
||||
return path
|
||||
.replace(/^\/+/, '/')
|
||||
.replace(/([^:])\/{2,}/g, '$1/')
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user