Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter-attribs excludes using attribute names with names shorter than three characters #56

Open
luxbock opened this issue Apr 25, 2017 · 0 comments

Comments

@luxbock
Copy link

luxbock commented Apr 25, 2017

(defn filter-attribs
  [attribs]
  (loop [acc (transient attribs), ks (keys attribs)]
    (if ks
      (recur
       (if (= "__" (subs (name (first ks)) 0 2)) (dissoc! acc (first ks)) acc)
       (next ks))
      (persistent! acc))))

The call to subs prevents passing in keys such as :x or :y in the attribute map of a SVG hiccup vector. It would be handy to be able to use these with svg/group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant