Closed omrsin closed 11 years ago
Hello,
I'm using a flipbook js library called turn.js. This library uses certain keys when creating the flibooks. For example in normal js it would be like this:
$(flipbook).turn({ width: 922, height: 600, autoCenter: true, pages: 12, when: { turning: function(event, page, view) { } } });
If I use coffeescript it goes like this:
$(flipbook).turn width:922, height:600, autoCenter: true, pages: 12, when: turning: (event, page, view) ->
But it ends up parsing like this:
$(flipbook).turn({ width: 912, height: 650, elevation: 50, gradients: true, autoCenter: true }, { when: { turning: function(event, page, view) { } } } );
I'm guessing it is a problem with the WHEN keyword being recognized as a special word for the switch instruction.
Thanks
Looks like a specialcase of a specialcase. Maybe that's fixed by #2712
Looks like it's fixed on master for me. Should be fine in the next release.
Thanks! I'll keep an eye on it also in the coffee-rails gem
Hello,
I'm using a flipbook js library called turn.js. This library uses certain keys when creating the flibooks. For example in normal js it would be like this:
If I use coffeescript it goes like this:
But it ends up parsing like this:
I'm guessing it is a problem with the WHEN keyword being recognized as a special word for the switch instruction.
Thanks