Skip to content

Commit 2101371

Browse files
gengjiawenBridgeAR
authored andcommitted
repl: remove redundant escape
PR-URL: #26496 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 6b004e0 commit 2101371

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/repl.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ function REPLServer(prompt,
226226
letawaitPromise=false;
227227
constinput=code;
228228

229-
if(/^\s*\{/.test(code)&&/\}\s*$/.test(code)){
229+
if(/^\s*{/.test(code)&&/}\s*$/.test(code)){
230230
// It's confusing for `{ a : 1 }` to be interpreted as a block
231231
// statement rather than an object literal. So, we first try
232232
// to wrap it in parentheses, so that it will be interpreted as

0 commit comments

Comments
 (0)