summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGiovanni Lela <giovanni.lela@gmail.com>2017-11-06 16:01:17 +0100
committerRich Trott <rtrott@gmail.com>2017-11-06 18:02:33 +0000
commitcab34ba75eb4979b2523e4f4ee44d163e396a563 (patch)
tree1cec33846f55e19cf867e8616c46faa3c889c1a5 /tools
parent0300565af933e705452e35a68b8befbb3afac719 (diff)
downloadandroid-node-v8-cab34ba75eb4979b2523e4f4ee44d163e396a563.tar.gz
android-node-v8-cab34ba75eb4979b2523e4f4ee44d163e396a563.tar.bz2
android-node-v8-cab34ba75eb4979b2523e4f4ee44d163e396a563.zip
tools: replace string concatenation with template literals
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: https://github.com/nodejs/node/pull/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>
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/json.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/doc/json.js b/tools/doc/json.js
index ddf7cedcf4..2966e4c3d9 100644
--- a/tools/doc/json.js
+++ b/tools/doc/json.js
@@ -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} `;
}
});