【发布时间】:2012-09-10 03:12:26
【问题描述】:
我想使用 RedCloth 输出一些文本。我试图弄清楚这是如何工作的,但我无法得到我想要的结果。
使用的代码:
truncate(sanitize(RedCloth.new("*some* interesting text")).to_html, length: 6)
结果:
*一些*
预期结果:
一些我...
【问题讨论】:
标签: ruby-on-rails ruby truncate sanitize redcloth