From ce007be05b414ecf1840814e13194ec045f2680e Mon Sep 17 00:00:00 2001 From: Giovanni Lela Date: Mon, 6 Nov 2017 16:01:17 +0100 Subject: [PATCH] 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 Reviewed-By: Gireesh Punathil Reviewed-By: Vse Mozhet Byt Reviewed-By: Rich Trott --- tools/doc/json.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/doc/json.js b/tools/doc/json.js index bac2454e7904f0..9eceefb2df1f0f 100644 --- a/tools/doc/json.js +++ b/tools/doc/json.js @@ -235,8 +235,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} `; } });