weavejester / hiccup

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

Detect nil attributes at runtime #208

Closed luontola closed 6 months ago

luontola commented 7 months ago

Before this change (html [:br (identity nil)]) used to produced "<br></br>". After this change it will produce "<br />".

The use case where this can matter is if the user has a function which returns either a map of attributes or nil.

weavejester commented 7 months ago

Thanks for the fix! And apologies for taking a little while to take a closer look.

luontola commented 7 months ago

Changes done.

luontola commented 6 months ago

@weavejester This too is ready