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 <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>
  • Loading branch information
lambrojos authored and MylesBorins committed Nov 28, 2017
1 parent e7a456a commit ce007be
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 @@ -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} `;
}
});

Expand Down

0 comments on commit ce007be

Please sign in to comment.