mirror of
https://gitee.com/docsifyjs/docsify.git
synced 2024-12-01 03:30:00 +08:00
fix(util): fix crash, fixed #154
This commit is contained in:
parent
25ccc79e56
commit
51832d3506
@ -54,5 +54,7 @@ export const getParentPath = cached(path => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const cleanPath = cached(path => {
|
export const cleanPath = cached(path => {
|
||||||
return path.replace(/([^:])\/{2,}/g, '$1/')
|
return path
|
||||||
|
.replace(/^\/+/, '/')
|
||||||
|
.replace(/([^:])\/{2,}/g, '$1/')
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user