fix: handle \s in path

This commit is contained in:
EnixCoda 2021-06-07 18:01:46 +08:00
parent d19b84c9ee
commit d5df98f684
No known key found for this signature in database
GPG key ID: 0C1A07377913A1DD

View file

@ -244,8 +244,8 @@ export function getPath() {
return []
}
const path = ((pathElement as HTMLDivElement).textContent || '')
.trim()
.replace(/ \/ Jump to $/, '')
.replace(/\n/g, '')
.replace(/\/\s+Jump to.*/m, '')
.trim()
.split('/')
.filter(Boolean)