The replace-vars
transformation does not recurse into child nodes, including text content.
The selector :#alert-username
selects the <b id="alert-username">
tag:
{:tag :b, :attrs {:id "alert-username"}, :content ["${fullname}"]}
So, replace-vars
, because it is used on the tag, will search the the tag's attributes and ignore the tag's contents.
You can apply the transform to the contents with something like the following:
[:#alert-username] (transform-content
(replace-vars {:fullname (fullname request)}))
But, that will also search any child tag attributes, along with any child text nodes.
Note: The transform-content
macro is part of the net.cgrand.enlive-html
namespace.