尝试使用Enlive在两个div之间添加& mdash;,但
{:tag :span,
:attrs {:class "mdash"},
:content "—"}只返回实际的文本& mdash;,而不是绘制-
有什么想法?
发布于 2015-08-27 00:01:30
对于普通的(content some-string),Enlive将转义&,因为这是一个合理的默认设置。
要设置原始的超文本标记语言内容和转义字符,可以使用在幕后使用html-snippet的html-content。
示例
(html/html-snippet "—<p>hello</p>")
("—" {:tag :p,
:attrs nil,
:content ("hello")})https://stackoverflow.com/questions/29179226
复制相似问题