Multiline template strings that don't break indentation

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Sep 9 07:51:10 PDT 2014


Well, just for fun

        const N = "\n";  //maybe we could find evocative unicode name.
        var a = `This is a template string. ${
               N}Even though each line is indented to keep the ${
               N}code neat and tidy, the white space used to indent ${
               N}is not in the resulting string`;


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140909/a26927b6/attachment.html>


More information about the es-discuss mailing list