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

:foo/bar renders as bar #135

Open
greg-at-droit opened this issue Jul 27, 2016 · 0 comments
Open

:foo/bar renders as bar #135

greg-at-droit opened this issue Jul 27, 2016 · 0 comments

Comments

@greg-at-droit
Copy link

Thank you for hiccup!

I'm curious what's the thinking behind taking only the name of keywords here?

(extend-protocol ToString
  clojure.lang.Keyword
  (to-str [k] (name k))
  ....

As a result:

user> (hiccup.util/as-str :foo/bar)
"bar"

user> (hiccup.core/html [:p :foo/bar])
"<p>bar</p>"

Now that I understand what's happening, a work-around is to force keywords to str. But it was confusing me for longer than I'd like to admit, so I wanted to ask.

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