新手问题 xxxxxxx

lihuazhang · December 15, 2015 · Last by lihuazhang replied at December 16, 2015 · 2099 hits

xxxxx

详细说明怎么做的,不要只是小部分代码,光那个 table 函数看不出问题 请站在对方的角度想,如何才能让别人看明白你的过程

#1 楼 @huacnlee

问题:Redcarpet 的 table render 的时候,能在套一层 div 不?

我的做法:覆盖 table 函数。

def table(header, body)
       %(<div class="table-responsive"><table class="table table-bordered table-striped">#{header}#{body}</table><div>)
     end

结果: 这个函数不起作用。 出来的 table,没有外面 wrap 的 div。

代码在这里: https://github.com/ruby-china/ruby-china/blob/master/lib/markdown.rb#L29

You need to Sign in before reply, if you don't have an account, please Sign up first.