Hello List /.
I am trying to build a html table from a string using RedCloth.
My table should show some empty values
require ‘redcloth’
table = RedCloth.new("|a|b|c|d|\n|A||c|d|").to_html
puts table
produces:
Do you know how can I represent an empty value in a table ?
Thank you /.
On Jun 27, 7:31 pm, Rodrigo B. [email protected] wrote:
produces:
d
Do you know how can I represent an empty value in a table ?
Thank you /.
Posted viahttp://www.ruby-forum.com/.
Force empty cells to span 1 column with \1. In my test the cell
contains a space, if that’s “empty” enough.
puts RedCloth.new(“|a|b|c|d|\1|A||c|d|”).to_html
–
Michael M.
Guide to Ruby
Become an About.com Guide: beaguide.about.com
About.com is part of the New York Times Company