fix(util): correctly clean up duplicate slashes, fixed #153

This commit is contained in:
qingwei.li 2017-04-28 08:02:54 +08:00
commit 76c041ad48

View file

@ -54,5 +54,5 @@ export const getParentPath = cached(path => {
})
export const cleanPath = cached(path => {
return path.replace(/\/+/g, '/')
return path.replace(/([^:])\/{2,}/g, '$1/')
})