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>
This commit is contained in:
Giovanni Lela authored and cjihrig committed 2017-11-06 17:49:31 -05:00
1 parent ec1b1108af
commit e781d93bd0
1 file changed
+1 -2
+1 -2
View File
@@ -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} `;
}
});