Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
RedCloth: table with empty value
Rodrigo Bermejo
6/27/2008 11:31:00 PM
Hello List /.
I am trying to build a html table from a string using RedCloth.
My table should show some empty values
<code>
require 'redcloth'
table = RedCloth.new("|a|b|c|d|\n|A||c|d|").to_html
puts table
</code>
produces:
<table>
<tr>
<td>a</td>
<td>b</td>
<td>c</td>
<td>d</td>
</tr>
<tr>
<td>A</td>
<td>c</td>
<td>d</td>
</tr>
</table>
Do you know how can I represent an empty value in a table ?
Thank you /.
--
Posted via
http://www.ruby-...
.
1 Answer
michael.c.morin
6/28/2008 7:53:00 PM
0
On Jun 27, 7:31 pm, Rodrigo Bermejo <rodrigo.berm...@ps.ge.com> wrote:
> Hello List /.
>
> I am trying to build a html table from a string using RedCloth.
> My table should show some empty values
> <code>
>
> require 'redcloth'
> table = RedCloth.new("|a|b|c|d|\n|A||c|d|").to_html
> puts table
> </code>
> produces:
> <table>
> <tr>
> <td>a</td>
> <td>b</td>
> <td>c</td>
> <td>d</td>
> </tr>
> <tr>
> <td>A</td>
> <td>c</td>
> <td>d</td>
> </tr>
> </table>
>
> Do you know how can I represent an empty value in a table ?
> Thank you /.
> --
> Posted via
http://www.ruby-...
.
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 Morin
Guide to Ruby
http://ruby....
Become an About.com Guide: beaguide.about.com
About.com is part of the New York Times Company
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
RedCloth: table with empty value
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password