plugin/bookish.rb in livetext-0.8.78 vs plugin/bookish.rb in livetext-0.8.79

- old
+ new

@@ -23,11 +23,11 @@ def list! _out "<ul>" lines = _body.each # {|line| _out "<li>#{line}</li>" } loop do line = lines.next - line = _formatting(line) + line = _format(line) if line[0] == " " _out line else _out "<li>#{line}</li>" end @@ -75,11 +75,11 @@ def figure name = @_args[0] num = @_args[1] title = @_args[2..-1].join(" ") - title = _formatting(title) + title = _format(title) _out "<img src='#{name}'></img>" _out "<center><b>Figure #{num}</b> #{title}</center>" end def chapter @@ -136,11 +136,11 @@ wide = "90" extra = _args[2] delim = " :: " _out "<br><center><table border=1 width=#{wide}% cellpadding=5>" lines = _body(true) - lines.map! {|line| _formatting(line) } + lines.map! {|line| _format(line) } lines.each do |line| cells = line.split(delim) percent = (100/cells.size.to_f).round _out "<tr>" @@ -160,11 +160,11 @@ delim = " :: " _out "<table cellpadding=2>" lines = _body(true) maxw = nil lines.each do |line| - _formatting(line) + _format(line) cells = line.split(delim) wide = cells.map {|x| x.length } maxw = [0] * cells.size maxw = maxw.map.with_index {|x, i| [x, wide[i]].max } end @@ -191,10 +191,10 @@ delim = " :: " _out "<br><center><table border=1 width=90% cellpadding=5>" lines = _body(true) maxw = nil lines.each do |line| - _formatting(line) + _format(line) cells = line.split(delim) wide = cells.map {|x| x.length } maxw = [0] * cells.size maxw = maxw.map.with_index {|x, i| [x, wide[i]].max } end