fhd / clostache

{{ mustache }} for Clojure
GNU Lesser General Public License v3.0
318 stars 62 forks source link

Support sorted-sets #27

Closed JulianBirch closed 11 years ago

JulianBirch commented 11 years ago

Hi, this fixes #27. I've added one test to verify the fix (outlined in the issue). It still passes all the other tests in test-parser.

JulianBirch commented 11 years ago

I'll just remark that the patch doesn't cover some stuff that core.incubator/seqable? checks, like Iterable. This raises the question as to whether you should a) add in the other cases, or b) take a dependency on core.incubator.

fhd commented 11 years ago

Using core.incubator/seqable? sounds preferable. But I suppose you disagree, since you went with the instance check? :smiley:

JulianBirch commented 11 years ago

Actually, I really couldn't decide, so I went with the smallest change possible. I've revised it to use core.incubator and made it work with inverted sections as well. Hope you like it. (Sorry about the commit mess, it's been a very long week at work, and it's only Wednesday.)

fhd commented 11 years ago

Thanks, merged!

Looks like core.incubator added some nasty warnings to the tests, but I can live with that for now:

Reflection warning, clojure/core/incubator.clj:84 - reference to field getClass can't be resolved.
Reflection warning, clojure/core/incubator.clj:84 - reference to field isArray can't be resolved.