★ wanayoo — archive 1999 https://github.com/nodejs/node/commit/1080a1af3dNouvelle recherche | Portail wanayoo
Skip to content
Permalink
Browse files
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>
  • Loading branch information
gengjiawen authored and BethGriggs committed Apr 16, 2019
1 parent 0a976ec commit 1080a1af3d088310207a56e2be3d70b5ec7c4a80
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/repl.js
@@ -233,7 +233,7 @@ function REPLServer(prompt,
var awaitPromise = false;
var 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

0 comments on commit 1080a1a

Please sign in to comment.