This is very handy, but it would be nice in some cases to have the option to preserve line breaks, but condense consecutive white-space characters after each line break. That would allow the creation of multi-line strings that are indented in the code, but not in the output.
function generateLetter() {
return `Dear Sir or Madam,
We are writing to inform you that this example will clearly show that as of
${new Date().toLocaleString()} line breaks are preserved, but leading space from
each line is stripped away.
Sincerely,
Us`;
}
This is very handy, but it would be nice in some cases to have the option to preserve line breaks, but condense consecutive white-space characters after each line break. That would allow the creation of multi-line strings that are indented in the code, but not in the output.