【发布时间】:2012-02-29 12:29:17
【问题描述】:
我正在用haml写文本:
Blab bla for any questions contact us on me@foo.com.
所以haml看起来像
%p
Blab bla for any questions contact us on
= mail_to 'me@foo.com'
.
注意 .在 ascii 中是点,我也可以用 = '.' 替换该行(渲染字符串点)
但渲染的文本看起来像
Blab bla for any questions contact us on me@foo.com .
区别在于末尾点之前的空格
我想出并有效的解决方案是
%p
Blab bla for any questions contact us on
= mail_to('me@foo.com') + '.'
我只是在寻找最佳实践:) thx
【问题讨论】:
标签: ruby-on-rails haml