Multiline template strings that don't break indentation

Alexander Kit alex.kit at atmajs.com
Fri Sep 12 06:31:34 PDT 2014


On 10 September 2014 01:01, Andy Earnshaw <andyearnshaw at gmail.com> wrote:

> *Git and linting tools usually bark at you if you have trailing white
> space anyway*
>

Template string is a literal,  so any of the linter should not complain
about the trailing whitespace inside, if so this should considered as a bug
in linter itself.

*> should have the indentation removed, but not in the case where a
non-white space character is between the first ` and the newline? *

Correct, with the new line developer explicitly defines he wants his
template string to be auto deindented, otherwise leaves the string as is.
It is more flexible, and there is no need in any of the tags as was
suggested.

Cheers, Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140912/94f7b34a/attachment.html>


More information about the es-discuss mailing list