lib/review/rstbuilder.rb in review-2.2.0 vs lib/review/rstbuilder.rb in review-2.3.0

- old
+ new

@@ -1,9 +1,9 @@ # encoding: utf-8 -# + # Copyright (c) 2002-2006 Minero Aoki -# 2008-2016 Minero Aoki, Kenshi Muto +# 2008-2017 Minero Aoki, Kenshi Muto # # This program is free software. # You can distribute or modify this program under the terms of # the GNU LGPL, Lesser General Public License version 2.1. # @@ -315,13 +315,15 @@ puts lines.map{|line| " #{line}"}.join("") blank end def table_header(id, caption) + unless id.nil? + blank + puts ".. _#{id}:" + end blank - puts ".. _#{id}:" - blank puts ".. list-table:: #{compile_inline(caption)}" puts " :header-rows: 1" blank end @@ -348,9 +350,13 @@ str end def table_end blank + end + + def emtable(lines, caption = nil) + table(lines, nil, caption) end def comment(lines, comment = nil) puts lines.map{|line| " .. #{line}"}.join("") end