hiccup
hiccup copied to clipboard
Using both the class dot notation and attribute map prevents evaluation of local variables
The code
(let [class-local-var "class-foo class-bar"]
(hiccup.page/html5
[:body
[:div.test {:class class-local-var}]]))
Expected output
<!DOCTYPE html>
<html><body><div class="test class-foo class-bar"></div></body></html>
Actual output
<!DOCTYPE html>
<html><body><div class="test class-local-var"></div></body></html>
Note that the symbol class-local-var was not evaluated into class-foo class-bar
Tested on Version 1.0.5
This only appears to happen when you include a class with dot notation and through the map attributes :class
keyword. The workaround currently would be to only use dot notation or only using map attributes until this is fixed.