Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include some coverage of common tag functions for tagged template literals #1273

Open
ZachSaucier opened this issue Apr 16, 2018 · 1 comment

Comments

@ZachSaucier
Copy link

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.

@ZachSaucier 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
@getify
Copy link
Owner

getify commented Apr 16, 2018

Good suggestion for second edition, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants