如何使haml文件中的句子变粗?

时间:2015-05-11 17:53:58

标签: html ruby-on-rails haml

这是我的haml文件中的代码:

= render :partial => _paragraph,
         :locals => {:content =>  "It is hot. But something's definitely up."}

如何将最后一句加粗?

1 个答案:

答案 0 :(得分:1)

您可以在字符串中添加标记,然后将其作为原始文本插入段落

= render :partial => _paragraph, :locals => {:content =>  "It's one thing to notice an uptick in appetite if you've been training hard at the gym, or if you're pregnant or PMS-ing. <b>But when you always feel like a bottomless pit for no obvious reason, then something's definitely up.</b>"}

在_paragraph中

= raw content