(defn annotate [node]
(cond
(xml/tag? node)
(let [node (update-in node [:content] #(map annotate %))]
(vary-meta node assoc ::annotations {:emit (tag-emitter node)}))
(xml/comment? node)
(vary-meta node assoc ::annotations {:emit (comment-emitter node)})
:else node))
Comments top
No comments for annotate. Log in to add a comment.