新手问题 xxxxxxx

lihuazhang · 2015年12月15日 · 最后由 lihuazhang 回复于 2015年12月16日 · 2099 次阅读

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

需要 登录 后方可回复, 如果你还没有账号请 注册新账号