这是我的haml文件中的代码:
= render :partial => _paragraph,
:locals => {:content => "It is hot. But something's definitely up."}
如何将最后一句加粗?
答案 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