weavejester / hiccup

Fast library for rendering HTML in Clojure
http://weavejester.github.io/hiccup
Eclipse Public License 1.0
2.68k stars 174 forks source link

make <p> container element #91

Closed jiriknesl closed 10 years ago

jiriknesl commented 10 years ago

Fixes Issue #90 https://github.com/weavejester/hiccup/issues/90

dg commented 10 years ago

It is better to list the void elements than non-void because a lot of elements are still missing… for example: <abbr />, <address />, <audio />, ... - all is invalid.

asmala commented 10 years ago

I agree with @dg. I'm trying to find an authoritative list of void elements but here's a fairly comprehensive one:

(def ^{:doc "A list of elements that must be rendered without a closing tag."
       :private true}
  void-tags
  #{"area" "base" "br" "col" "command" "embed" "hr" "img" "input" "keygen" "link"
    "meta" "param" "source" "track" "wbr"})

@jiriknesl, if you think this'd meet your needs, would you like to update the pull request to use void tag check instead?

jiriknesl commented 10 years ago

@asmala thanks for the list I will definitely think of it. Hope Hiccup is maintained too.

weavejester commented 10 years ago

I've scheduled some time this weekend to address Hiccup issues. Thanks for being patient.

dg commented 10 years ago

Please re-open it, it is really wrong fix. What about other tags like <abbr />, <address />, <audio /> and many others?

weavejester commented 10 years ago

Those would be best addressed in a separate pull request. I don't want to pollute this pull request with code unrelated to the subject.

But, by all means, open up a new PR that refactors the container-tags into something better.