You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When reading though YDKJS: ES6 & Beyond; Chapter 2: Syntax about Tagged Template Literals, I thought of the case, "what if a multi-line tagged template literal is inside of a function or other containing block with indentation?" That lead me to test and see that by default it doesn't compensate for white space indentation, but YDKJS doesn't cover this case nor similar ones to it. I don't think YDKJS needs to cover all similar cases, but I think it would be a good idea to at least point to common ideas or a library of common ones such as common-tags that I came across which provides a template literal tag function called stripIndent that helps with cases like this.
Thanks for writing the book! It's thorough and very helpful for me learning new ES6 features.
The text was updated successfully, but these errors were encountered:
ZachSaucier
changed the title
Include some coverage of common tags for
Include some coverage of common tag functions for tagged template literals
Apr 16, 2018
When reading though YDKJS: ES6 & Beyond; Chapter 2: Syntax about Tagged Template Literals, I thought of the case, "what if a multi-line tagged template literal is inside of a function or other containing block with indentation?" That lead me to test and see that by default it doesn't compensate for white space indentation, but YDKJS doesn't cover this case nor similar ones to it. I don't think YDKJS needs to cover all similar cases, but I think it would be a good idea to at least point to common ideas or a library of common ones such as common-tags that I came across which provides a template literal tag function called
stripIndent
that helps with cases like this.Thanks for writing the book! It's thorough and very helpful for me learning new ES6 features.
The text was updated successfully, but these errors were encountered: