Below am creating a string with newlines, and will end up in an email later on.
if (action) {
description = `
Git pull request action: ${action}
Git pull request for repo: ${req.body.repository.full_name}
Git pull request for repo URL: ${req.body.repository.html_url}
Git pull request title: ${req.body.pull_request.title}
Git pull request description: ${req.body.pull_request.body}
Git pull request by user: ${req.body.pull_request.user.login}
Git pull request URL: ${req.body.pull_request.html_url}
`
};
However if I indent the lines like so
if (action) {
description = `
Git pull request action: ${action}
Git pull request for repo: ${req.body.repository.full_name}
Git pull request for repo URL: ${req.body.repository.html_url}
Git pull request title: ${req.body.pull_request.title}
Git pull request description: ${req.body.pull_request.body}
Git pull request by user: ${req.body.pull_request.user.login}
Git pull request URL: ${req.body.pull_request.html_url}
`
};
it also indents the output.
Question Is there a way to indent the lines without also indenting the output?