Multiline template strings that don't break indentation

Salvador de la Puente González salva at unoyunodiez.com
Thu Sep 11 23:28:31 PDT 2014


On 12 Sep 2014 07:40, "Sebastian Zartner" <sebastianzartner at gmail.com>
> And if someone wants to use his own tag? Would he have to reimplement
dontIndent or String.noIndentation by himself?
>
> What I meant above with tag concatenation would be something like this:

AFAIK a couple of brackets around the second tag and the string do the
trick.

var a = tag1 (tag2 `Template`);

Though tag1 tag2 would be optimal.

>
>         var a = String.noIndentation myTag
>                 `This is a template string.
>                  Even though each line is indented to keep the
>                  code neat and tidy, the white space used to indent
>                  is not in the resulting string`;
>
> So first the template string would be parsed by String.noIndentation and
subsequently by myTag.
>
> Sebastian
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140912/af6b9c2f/attachment.html>


More information about the es-discuss mailing list