可以将markdown嵌入erb吗? [英] Possible to embed markdown within erb?
本文介绍了可以将markdown嵌入erb吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果将haml用作rails视图模板,则可以通过使用:markdown"过滤器使用markdown来编写页面的一部分.
If you use haml as rails view template, you can write portion of your page using markdown by using the ":markdown" filter.
是否可以使用erb进行相同的操作?
Is is possible to do the same using erb?
推荐答案
ERB没有像这样的内置过滤器.您需要直接使用处理它的宝石,例如RDiscount或古老的BlueCloth.
ERB does not have filtering like this built-in. You'll need to directly use a gem that handles it, like RDiscount or the venerable BlueCloth.
这篇关于可以将markdown嵌入erb吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文