fix(helpers): correct regex of function escapePath (#2254)
This commit is contained in:
parent
bacd19c4ea
commit
9c042dd717
1 changed files with 2 additions and 2 deletions
|
|
@ -7,8 +7,8 @@ import fs from "fs"
|
|||
export function escapePath(fp) {
|
||||
return fp
|
||||
.replace(/\\ /g, " ") // unescape spaces
|
||||
.replace(/^".*"$/, "$1")
|
||||
.replace(/^'.*"$/, "$1")
|
||||
.replace(/^"(.*)"$/, "$1")
|
||||
.replace(/^'(.*)'$/, "$1")
|
||||
.trim()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue