Commit 5382deaa authored by Anna Henningsen's avatar Anna Henningsen Committed by Myles Borins
Browse files

repl: don’t complete non-simple expressions

Change the regular expression that recognizes “simple” JS expressions
to requiring that the full line needs to match it.

Previously, in terms like `a().b.`, `b.` would be a partial match.
This meant that completion would evaluate `b` and either fail with
a `ReferenceError` or, if `b` was some global, return the properties
of the global `b` object.

PR-URL: https://github.com/nodejs/node/pull/6192


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
parent f69416c0
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment