tbranyen / combyne

A template engine that works the way you expect.
MIT License
144 stars 19 forks source link

Issue with filter arguments #69

Open tbranyen opened 9 years ago

tbranyen commented 9 years ago

I tried passing:

{{ property|replace '-' ' ' }}

and the second argument appeared as ', ' instead of ' '

kadamwhite commented 9 years ago

What's the code of the filter you were using? I have almost the same filter in my application and it seems to be working as-expected

tbranyen commented 9 years ago

@kadamwhite https://github.com/tbranyen/combyne/pull/74

tbranyen commented 9 years ago

The bug is the result of: https://github.com/tbranyen/combyne/blob/master/lib/tree.js#L376-L377

We just need smarter parsing of the arguments. I think the tokenizer is fine, I think the stack is fine, it's just the tree building that is busted.