mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
lib: remove redundant global regexps
PR-URL: https://github.com/nodejs/node/pull/56182 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
1 parent
fa667d609e
commit
f10239fde7
2 files changed
+2
-2
No files matched your search
@@ -173,7 +173,7 @@ function formatTime(ms) {
|
||||
}
|
||||
|
||||
function safeTraceLabel(label) {
|
||||
return label.replace(/\\/g, '\\\\').replaceAll('"', '\\"');
|
||||
return label.replaceAll('\\', '\\\\').replaceAll('"', '\\"');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -705,7 +705,7 @@ Url.prototype.format = function format() {
|
||||
}
|
||||
}
|
||||
|
||||
search = search.replace(/#/g, '%23');
|
||||
search = search.replaceAll('#', '%23');
|
||||
|
||||
if (hash && hash.charCodeAt(0) !== CHAR_HASH)
|
||||
hash = '#' + hash;
|
||||
|
||||
Reference in new issue
Block a user