ckirkendall / kioo

Enlive/Enfocus style templating for Facebook's React and Om in ClojureScript.
Eclipse Public License 1.0
404 stars 39 forks source link

Transformation on a set of elements not working #22

Closed asmala closed 10 years ago

asmala commented 10 years ago

If I'm reading the docs correctly, I should be able to apply a transformation to two different selectors using a set, e.g. #{[:h1] [:h2]} (some-transformation…). The set syntax seems to be working if there's only one selector in the set, e.g. #{[:h1]}, but adding a second selector causes nothing to happen.

I was able to reproduce this by editing /example/om/src/kioo_example/core.clj as follows:

(defsnippet my-header "main.html" [:header]
  [{:keys [heading navigation]}]
  {[:h1] (content heading)
   [:ul] (content (map my-nav-item navigation))
   #{[:h1] [:ul]} (set-style :font-style "italic")}) ; This does not work

Using either #{[:h1]} or #{[:ul]} has the expected effect.

ckirkendall commented 10 years ago

hmmm, this is going to take a bit of investigation. I delegate the selection of nodes to enlive directly.

ckirkendall commented 10 years ago

This should be fixed in the new snapshot on clojars.

asmala commented 10 years ago

Great, thanks!