-
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
tools: replace string concetation with template literals #16801
Conversation
@@ -518,7 +518,7 @@ function getId(text) { | |||
text = text.replace(/^_+|_+$/, ''); | |||
text = text.replace(/^([^a-z])/, '_$1'); | |||
if (idCounters.hasOwnProperty(text)) { | |||
text += '_' + (++idCounters[text]); | |||
text += `_${(++idCounters[text])}`; |
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.
A nit (this can be done by whoever will land the PR): parentheses seem redundant now, this can simply be:
text += `_${++idCounters[text]}`;
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.
Sorry, I missed this comment while landing. Doesn't seem worth force-pushing or doing an additional commit at this point to me, although if someone opens a PR for it, sure, I'm OK with that.
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.
Replace string concatenation in tools/doc/html.js with template literals. PR-URL: nodejs#16801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Landed in 94fb298. Thanks for the contribution! 🎉 |
Replace string concatenation in tools/doc/html.js with template literals. PR-URL: nodejs#16801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs#16845 Ref: nodejs#16801 (comment) Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs#16845 Ref: nodejs#16801 (comment) Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in tools/doc/html.js with template literals. PR-URL: #16801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in tools/doc/html.js with template literals. PR-URL: #16801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #16845 Ref: #16801 (comment) Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #16845 Ref: #16801 (comment) Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in tools/doc/html.js with template literals. PR-URL: #16801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #16845 Ref: #16801 (comment) Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in tools/doc/html.js with template literals. PR-URL: #16801 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #16845 Ref: #16801 (comment) Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace string concatenation in
tools/doc/html.js
with template literals.Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes