You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using a custom helper for the "range" tag, which all works fine, however there seems to be a problem with the if statement inside it. Running handlebars, rather than getting a list of object tags separated by a comma, I get a bunch of commas all grouped together, then the list of objects next to them (not comma seperated).
,,,,,,,,,{}{}{}{}{}{}{}{}{}{}
I'm trying to debug in at the moment, but it looks to be down to the fact that at some point, the span renderer for the comma renders against the writer that is in the scope, which is the current outer blocks scope, rather than the writer generated for the range helper, thus all the commas get written to the main writer, then on completion of the helper, all the other objects are written to the writer directly afterwards.
I'm currently getting really confused with the visitor rabbit whole to be able to narrow it down to a specific location, but any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Can you share your code for your helper? I'm wondering if it is actually because it is trying to resolve @index but doesn't realise you are creating an enumerable helper. Might need to expand the helper API to allow you to specifiy what the values for @index, @first and @last should be?
I've created a template like this:
I'm using a custom helper for the "range" tag, which all works fine, however there seems to be a problem with the if statement inside it. Running handlebars, rather than getting a list of object tags separated by a comma, I get a bunch of commas all grouped together, then the list of objects next to them (not comma seperated).
I'm trying to debug in at the moment, but it looks to be down to the fact that at some point, the span renderer for the comma renders against the writer that is in the scope, which is the current outer blocks scope, rather than the writer generated for the range helper, thus all the commas get written to the main writer, then on completion of the helper, all the other objects are written to the writer directly afterwards.
I'm currently getting really confused with the visitor rabbit whole to be able to narrow it down to a specific location, but any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: