Open jszaday opened 8 years ago
Looks like a bug.
On the flip side, you can use Handlebars comments {{!-- foo --}}
which should not have this problem. You shouldn't use unless you want to preserve the comments in the compiled template.
Alright, duly noted. I was not aware those are a thing and my editor (Atom) just auto inserts HTML-style comments when using the comment keyboard macro (Ctrl+/); perhaps I should look into updating their handlebars plugin as well, haha.
I noticed something peculiar about the way htmlbars is treating comments; however, I am not sure if it is a bug or by design. I first noticed this when I commented out the link-to beginning and end tags around a line of code like so:
When I went to look at the live preview, I expected to see the group names; instead I didn't see them and when I inspected the page, I saw this. It seems like htmlbars is treating the two separate comments as one large comment and ignoring the content between them. This is not a big deal since it's easily fixed by moving the
{{group.name}}
line before the commented outlink-to
statement (like so) but I thought I'd post it here, just in case.