-
Notifications
You must be signed in to change notification settings - Fork 177
Open
Description
Hi,
I have the following use case:
Given some complex hiccup structure, I would like to dynamically append classes to children of the hiccup element in a parent function. I would like an API like the following.
For example,
(:require [hiccup.compiler :as c])
(def current-hiccup (complex-hiccup-structure))
(def wanted-hiccup
(let [[tag attrs children] (c/normalize-element current-hiccup)]
[tag attrs (map (partial add-class "child-class") current-hiccup)])))
I noticed normalize-element
is in the compilier namespace: https://github.com/weavejester/hiccup/blob/master/src/hiccup/compiler.clj#L87
but that is not documented. Can we document that namespace?
Metadata
Metadata
Assignees
Labels
No labels