Skip to content

Commit

Permalink
repl: remove redundant escape
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
gengjiawen authored and BridgeAR committed Mar 13, 2019
1 parent b7568e1 commit a26e9a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function REPLServer(prompt,
let awaitPromise = false;
const input = code;

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

0 comments on commit a26e9a8

Please sign in to comment.