Skip to content

Commit

Permalink
tools: replace string concatenation with template literals
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
lambrojos authored and MylesBorins committed Nov 16, 2017
1 parent 0fa659c commit aaf7e83
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/doc/json.js
Expand Up @@ -256,8 +256,7 @@ function processList(section) {
`${JSON.stringify(tok)}\n` +
JSON.stringify(list));
}
current.textRaw = current.textRaw || '';
current.textRaw += `${tok.text} `;
current.textRaw = `${current.textRaw || ''}${tok.text} `;
}
});

Expand Down

0 comments on commit aaf7e83

Please sign in to comment.