machty / emblem.js

Emblem.js - Ember-friendly, indented syntax alternative for Handlebars.js
http://emblemjs.com
MIT License
1.04k stars 81 forks source link

@-prefixed variables / data keywords broken? #254

Closed richmolj closed 6 years ago

richmolj commented 8 years ago

Helpers like @index, @first etc. are not working for me. I see tests for this are passing, so I am not sure what the issue is. Using ember 1.13.9, ember-cli-emblem 0.3.1. Something very basic:

each foo in foos
  p index: #{@index}

Will be empty. Something like if @index won't even compile. Is there something I am missing here?

Original implementation: https://github.com/machty/emblem.js/pull/150 Tests (passing): https://github.com/machty/emblem.js/blob/master/tests/integration/vanilla-handlebars-support-test.js#L70-L76

machty commented 8 years ago

This functionality was removed in the push to 0.5.0 (the big change where Emblem outputs Handlebars code rather than brittle Handlebars AST); it shouldn't be a lot of work to add it back, but given most people use Emblem with Ember, there hasn't been a big community need for it. I don't have the time to add this feature back, but it shouldn't be too difficult, and I'd happily accept a PR that got these tests passing again.

thec0keman commented 6 years ago

Closing as this is now fixed on master (release forthcoming)