>
> The tag goes at the front.
>
> I know. I didn't see this functionality as a tag, though, but rather as a
flag for the client. Having this functionality available as a tag has some
consequences. See below.
> What's missing from the design that can't be provided as a standard
> exported deindent function?
>
> Concatenating tags, maybe? And the function itself?
> exactly:
>
> var a = dontIndent
> `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`;
>
> or, following the precedent to 'raw':
>
> var a = String.noIndentation
> `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`;
>
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:
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
[email protected]
https://mail.mozilla.org/listinfo/es-discuss