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>
pull/16807/merge
Giovanni Lela 2017-11-06 16:01:17 +01:00 committed by Rich Trott
parent 0300565af9
commit cab34ba75e
1 changed files with 1 additions and 2 deletions

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} `;
}
});