-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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 #16804
Conversation
tools/doc/preprocess.js
Outdated
inc + `\n<!-- [end-include:${fname}] -->\n`; | ||
input = input.split(include + '\n').join(includeData[fname] + '\n'); | ||
includeData[fname] = `<!-- [start-include:${fname}] --> | ||
${inc} |
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.
lost indentation here?
tools/doc/preprocess.js
Outdated
includeData[fname] = `<!-- [start-include:${fname}] -->\n` + | ||
inc + `\n<!-- [end-include:${fname}] -->\n`; | ||
input = input.split(include + '\n').join(includeData[fname] + '\n'); | ||
includeData[fname] = `<!-- [start-include:${fname}] --> |
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.
Multi-line string concatenation is actually ok (the way it was before), but it would be nice if the 2nd line became this instead:
`${inc}\n<!-- [end-include:${fname}] -->\n`
That way we don't have to lose indentation level.
Replace string concatenation with template literals in tools/doc/preprocess.js. PR-URL: nodejs#16804 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Landed in 13e983b |
Thanks for the contribution! 🎉 |
Replace string concatenation with template literals in tools/doc/preprocess.js. PR-URL: nodejs#16804 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Replace string concatenation with template literals in tools/doc/preprocess.js. PR-URL: #16804 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Replace string concatenation with template literals in tools/doc/preprocess.js. PR-URL: #16804 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Replace string concatenation with template literals in tools/doc/preprocess.js. PR-URL: #16804 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Replace string concatenation with template literals in tools/doc/preprocess.js. PR-URL: #16804 Reviewed-By: Vse Mozhet Byt <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Anatoli Papirovski <[email protected]>
Replace string concatenation in tools/doc/preprocess.js with template literals.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)