-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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 concatenation with template literals #16806
Conversation
Replaces a string concatenation in the processList function in doc/json.js.
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.
Thanks @lambrojos! Just a small change request below.
tools/doc/json.js
Outdated
@@ -257,7 +257,7 @@ function processList(section) { | |||
JSON.stringify(list)); | |||
} | |||
current.textRaw = current.textRaw || ''; | |||
current.textRaw += `${tok.text} `; | |||
current.textRaw = `${current.textRaw}${tok.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.
Maybe a slightly better way of doing this would be to make it all one line, like so:
current.textRaw = `${current.textRaw || ''}${tok.text} `;
If missing, initialize the textRow property in the same line of the concatenation.
Replace a string concatenation in the processList function in doc/json.js. If missing, initialize the textRow property in the same line of the concatenation. PR-URL: nodejs#16806 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Landed in cab34ba. Thanks for the contribution! 🎉 |
Replace a string concatenation in the processList function in doc/json.js. If missing, initialize the textRow property in the same line of the concatenation. PR-URL: nodejs#16806 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace a string concatenation in the processList function in doc/json.js. If missing, initialize the textRow property in the same line of the concatenation. PR-URL: #16806 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace a string concatenation in the processList function in doc/json.js. If missing, initialize the textRow property in the same line of the concatenation. PR-URL: #16806 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace a string concatenation in the processList function in doc/json.js. If missing, initialize the textRow property in the same line of the concatenation. PR-URL: #16806 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replace a string concatenation in the processList function in doc/json.js. If missing, initialize the textRow property in the same line of the concatenation. PR-URL: #16806 Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Replaces a string concatenation in the processList function
in doc/json.js.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)