-
Notifications
You must be signed in to change notification settings - Fork 28.6k
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
repl: support syntax highlighting #53571
base: main
Are you sure you want to change the base?
Conversation
65920a0
to
29fee78
Compare
CC @nodejs/repl |
Could you add some tests ? |
Tests have been added @ZYSzys, sorry I forgot to let you know when I pushed the commits. The failed tests appear unrelated. |
ea42bc2
to
0e821ee
Compare
(got review - removing label) |
All review conversations have been resolved, any more notes? |
@RedYetiDev do you have some screenshots or a short video of the usage? I am not certain in what way the syntax highlighting has changed :) |
@BridgeAR highlighting is done to input, and it follows (mostly) the same rules as NewOldI'm not sure if this is |
I think both :) |
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
@MoLow ive added both labels. |
All checks have passed, but I assume this needs a CI to land. If someone could review, approve, and CI, it would be appreciated. Thanks :-)! |
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 PR currently only tests the new internal/repl/highlight
module, but I think tests should be aded to ensure the input is colored in REPL as well.
The |
I'd look at test like |
10ec630
to
7383951
Compare
7383951
to
1558cdf
Compare
1558cdf
to
b7e14de
Compare
Instead of sending many REPL changes in one PR (#52965), it was recommended to me to implement these one-by-one in several PRs.
First up: Syntax highlighting 🎉
This PR adds RegEx-based syntax highlighting to the REPL.
Notable change text (if text this short is even worth it): "The REPL now includes syntax highlighting for input."