Skip to content

Commit d5b6ec8

Browse files
committed
repl:Do not consider ... as a REPL command
This fix makes ... in REPL to be considered as a javascript construct rather than a REPL keyword Fixes: nodejs#14426
1 parent f37e3b1 commit d5b6ec8

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
@@ -419,7 +419,7 @@ function REPLServer(prompt,
419419
// Check to see if a REPL keyword was used. If it returns true,
420420
// display next prompt and return.
421421
if (trimmedCmd) {
422-
if (trimmedCmd.charAt(0) === '.' && isNaN(parseFloat(trimmedCmd))) {
422+
if (trimmedCmd.charAt(0) === '.' && trimmedCmd.charAt(1) != '.' && isNaN(parseFloat(trimmedCmd))) {
423423
const matches = trimmedCmd.match(/^\.([^\s]+)\s*(.*)$/);
424424
const keyword = matches && matches[1];
425425
const rest = matches && matches[2];

0 commit comments

Comments
 (0)