fix: cleanup from #7029 (#7328)

* refactor: fix issues arose from #7029

* refactor: move replaceAll -> replace in makeKeyString

* fix: move order of escape to backslash first

* style: lint
This commit is contained in:
Tristan F
2023-12-28 15:39:28 -05:00
committed by GitHub
parent 5af491382e
commit 68e60e332e
7 changed files with 14 additions and 13 deletions

View File

@ -99,7 +99,9 @@ function makeKeyString(identifier) {
return identifier.key;
}
return [identifier.namespace.replace(/:/g, '\\:'), identifier.key].join(':');
return [identifier.namespace.replace(/\\/g, '\\\\').replace(/:/g, '\\:'), identifier.key].join(
':'
);
}
/**