Open samselikoff opened 5 years ago
Unsure. I don't really like the idea that we'd have to provide a bunch of different hbsFoo
style exports, but I am sensitive to the specific issue.
Specifically,dedent
isn't really "good enough" here (also I much prefer stripIndent
which I commonly use from common-tags npm package over dedent
) since sometimes you want to effectively trim each line (leading and trailing spaces).
I wish there was a way to customize tag functions. Not sure what it would look like.
Or maybe hbs
could have some different properties that are different tags
hbs.stripIndent(`
<p>Hello, foo</p>
`
Ya, hbs.stripIndent
"feels" vaguely better to me.
Is there appetite for a version of
hbs
that dedents the template string?I find myself often doing things like
with an npm package, but it always feels like extra work & is most of the time (always?) what I want.
You can see in Ember Animated's codebase Ed's forced to manually dedent the strings because he never got around to installing
dedent
, which kinda sucks.Wondering if we could export an
hbsd
orhbsDedent
tag that does this automatically.Watcha think?