Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

lambrojos
Copy link
Contributor

Replaces a string concatenation in the processList function
in doc/json.js.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

Replaces a string concatenation in the processList function
in doc/json.js.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Nov 6, 2017
Copy link
Member

@apapirovski apapirovski left a 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.

@@ -257,7 +257,7 @@ function processList(section) {
JSON.stringify(list));
}
current.textRaw = current.textRaw || '';
current.textRaw += `${tok.text} `;
current.textRaw = `${current.textRaw}${tok.text} `;
Copy link
Member

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.
@apapirovski apapirovski added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 6, 2017
@Trott
Copy link
Member

Trott commented Nov 6, 2017

Trott pushed a commit to Trott/io.js that referenced this pull request Nov 6, 2017
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>
@Trott
Copy link
Member

Trott commented Nov 6, 2017

Landed in cab34ba.

Thanks for the contribution! 🎉

@Trott Trott closed this Nov 6, 2017
cjihrig pushed a commit to cjihrig/node that referenced this pull request Nov 6, 2017
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>
@cjihrig cjihrig mentioned this pull request Nov 6, 2017
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
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>
MylesBorins pushed a commit that referenced this pull request Nov 16, 2017
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>
@MylesBorins MylesBorins mentioned this pull request Nov 21, 2017
@gibfahn gibfahn mentioned this pull request Nov 21, 2017
MylesBorins pushed a commit that referenced this pull request Nov 21, 2017
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>
MylesBorins pushed a commit that referenced this pull request Nov 28, 2017
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants