Skip to content

Instantly share code, notes, and snippets.

@yuanmai
Created January 6, 2013 14:00
Show Gist options
  • Save yuanmai/4467322 to your computer and use it in GitHub Desktop.
Save yuanmai/4467322 to your computer and use it in GitHub Desktop.
clone-for does not work well with single letter tag
user> (use 'net.cgrand.enlive-html)
nil
user> (sniptest "<tr><bb><div></div></bb></tr>"
[:tr] (clone-for [option-value-map [1]]
[:div] (content "a")))
"<tr><bb><div>a</div></bb></tr>"
user> (sniptest "<tr><b><div></div></b></tr>"
[:tr] (clone-for [option-value-map [1]]
[:div] (content "a")))
"<tr></tr><b></b><div><b></b></div><b></b>"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment