From 2101371a8ac44ba80273ce85db716d5868276064 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Thu, 7 Mar 2019 22:31:13 +0800 Subject: [PATCH] repl: remove redundant escape MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26496 Reviewed-By: Ruben Bridgewater Reviewed-By: Michaël Zasso Reviewed-By: Anto Aravinth Reviewed-By: James M Snell Reviewed-By: Tobias Nießen --- lib/repl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repl.js b/lib/repl.js index 9e196f1ca3eaed..7288550d414261 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -226,7 +226,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