-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
readline: refactor readline module #12755
Conversation
Variety of code maintenance updates, cleanups
IMHO in order not to conflict with @12711 change the variable |
P.S.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, got one tiny correction though ;)
lib/internal/readline.js
Outdated
@@ -7,23 +7,38 @@ | |||
const ansi = | |||
/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g; | |||
|
|||
const kCSI = '\x1b'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The CSI would be \x1b[
(2 chars) or \x9b
, this is just an escape character, so it would probably be a good idea to rename this to kEscape
, or use \x1b[
here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, good point :-)
Moves escape codes into internal/readline for easier management.
@addaleax ... updated! |
Landed in a398516...d37f27a |
PR-URL: #12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Variety of code maintenance updates, cleanups PR-URL: #12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Moves escape codes into internal/readline for easier management. PR-URL: #12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: #12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Variety of code maintenance updates, cleanups PR-URL: nodejs#12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Moves escape codes into internal/readline for easier management. PR-URL: nodejs#12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
PR-URL: nodejs#12755 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Refactor parts of the readline module
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
readline