diff --git a/lib/review/builder.rb b/lib/review/builder.rb index ffe3b0499..1ac06d0c6 100644 --- a/lib/review/builder.rb +++ b/lib/review/builder.rb @@ -46,6 +46,7 @@ def bind(compiler, chapter, location) @output = StringIO.new @book = @chapter.book if @chapter.present? @tabwidth = nil + @tsize = nil if @book && @book.config && @book.config["tabwidth"] @tabwidth = @book.config["tabwidth"] end @@ -450,6 +451,18 @@ def ul_item_begin(lines) def ul_item_end end + def tsize(str) + if matched = str.match(/\A\|(.*?)\|(.*)/) + builders = matched[1].split(/,/).map{|i| i.gsub(/\s/, '') } + c = self.class.to_s.gsub(/ReVIEW::/, '').gsub(/Builder/, '').downcase + if builders.include?(c) + @tsize = matched[2] + end + else + @tsize = str + end + end + def inline_raw(args) if matched = args.match(/\|(.*?)\|(.*)/) builders = matched[1].split(/,/).map{|i| i.gsub(/\s/, '') } diff --git a/lib/review/htmlbuilder.rb b/lib/review/htmlbuilder.rb index 3b713645a..a207a6471 100644 --- a/lib/review/htmlbuilder.rb +++ b/lib/review/htmlbuilder.rb @@ -278,10 +278,6 @@ def sup_end(level) puts '' end - def tsize(str) - # null - end - def captionblock(type, lines, caption) puts %Q[
] unless caption.nil? diff --git a/lib/review/idgxmlbuilder.rb b/lib/review/idgxmlbuilder.rb index e65510fdd..69b37447c 100644 --- a/lib/review/idgxmlbuilder.rb +++ b/lib/review/idgxmlbuilder.rb @@ -1048,10 +1048,6 @@ def label(id) print "