开发者

Redcarpet don't show the pre

when I try

 ```ruby
 puts "hell开发者_C百科o world"
 ```

I get

<code>ruby<br> 
 print "hello world" <br></code>

but not get <pre lang="ruby">

the rails code

options = [:hard_wrap, :filter_html, :autolink, :no_intraemphasis, :fenced_code, :gh_blockcode] 
Redcarpet.new(text, *options).to_html 


FWIW: Have at least a one line gap between code block and preceding text

Link to answer: http://railscasts.com/episodes/272-markdown-with-redcarpet?view=comments#comment_153061

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜