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 <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
lambrojos authored and cjihrig committed Nov 6, 2017
1 parent ec1b110 commit e781d93
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tools/doc/json.js
Original file line number Diff line number Diff line change
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 e781d93

Please sign in to comment.