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.
我有以下 HAML 代码
//add some text %div.text <%= answer.text %>
浏览器中的结果是这样的
如何在此文本中添加引号,以便显示“test remuse”?
更自然的解决方案:
//add some text %div.text "#{answer.text}"
而且我认为您不需要 a %div,因为.text是 a divwith class="text":
%div
.text
div
class="text"
.text "#{answer.text}"