Skip to content

Commit a26e9a8

Browse files
gengjiawenBridgeAR
authored andcommitted
repl: remove redundant escape
PR-URL: nodejs#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 b7568e1 commit a26e9a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/repl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function REPLServer(prompt,
232232
let awaitPromise = false;
233233
const input = code;
234234

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

0 commit comments

Comments
 (0)