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

highlighting for {{@key}}? #31

Closed
Shadaez opened this issue Feb 9, 2014 · 4 comments · Fixed by #34
Closed

highlighting for {{@key}}? #31

Shadaez opened this issue Feb 9, 2014 · 4 comments · Fixed by #34

Comments

@Shadaez
Copy link

Shadaez commented Feb 9, 2014

You can use {{#each}} on objects, and you use {{@key}} to access the key of the current pair, currently it's just rendering plain white, which I believe is unintended?

@daaain
Copy link
Owner

daaain commented Feb 10, 2014

Hey, I think this might be the same issue as #30 ?

If you can please help out with a link to the relevant documentation about this that would be really appreciated!

@Shadaez
Copy link
Author

Shadaez commented Feb 10, 2014

handlebars-lang/handlebars.js#250 (comment) this is the closest thing I can find right now

and I don't know anything about using {{#each}} without a iterable, I meant that
{{#each objects}}
{{@key}} <-- wouldn't be highlighted
{{/each}}

@daaain
Copy link
Owner

daaain commented Feb 10, 2014

Ah right sorry, so you're after named object {{#each}} blocks!

This has been on my list for a long time, but I've just taken another look and found the problem, but not quite sure yet how to solve it. Basically variable.parameter.handlebars needs to include the @ symbol, but it's not declared explicitly so I'll have to dig a bit deeper into how syntax definitions work to understand what to do with it.

@daaain
Copy link
Owner

daaain commented Mar 17, 2014

Thanks @utkarshkukreti 👍

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

Successfully merging a pull request may close this issue.

2 participants