Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
试图添加一个— 在两个 div 之间使用 Enlive 但是
{:tag :span, :attrs {:class "mdash"}, :content "—"}
只返回实际文本 & mdash; 而不是画一个——
想法?
Enlive 会因为 normal 逃脱&,(content some-string)因为这是一个理智的默认设置。
&
(content some-string)
要设置原始 HTML 内容和转义字符,请使用html-content,它html-snippet在后台使用。
html-content
html-snippet
例子
(html/html-snippet "—<p>hello</p>") ("—" {:tag :p, :attrs nil, :content ("hello")})