Skip to content

Commit

Permalink
Accept multiline content in table cells. [#135 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber committed May 26, 2009
1 parent 7984430 commit 6a2a996
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/redcloth_scan/redcloth_scan.rl
Expand Up @@ -55,8 +55,8 @@
html_end_terminating_block = ( LF indent block_end_tag ) >A @{ fexec(reg); } ;

# tables
para = ( default+ ) -- LF ;
btext = para ( LF{2} )? ;
td_text = (default - LF)+ ;
btext = td_text (LF td_text)* ( LF{2} )? ;
tddef = ( D? S A C :> dotspace ) %SET_ATTR ;
td = ( tddef? btext >A %T :> "|" >{PASS(table, "text", "td");} ) >X ;
trdef = ( A C :> dotspace ) %SET_ATTR ;
Expand Down
20 changes: 20 additions & 0 deletions spec/fixtures/table.yml
Expand Up @@ -368,3 +368,23 @@ html: |-
<td>(myclass)class-bad</td>
</tr>
</table>
---
name: with line breaks in the cell
in: |-
|a|b
b|
|c
c|d|
html: |-
<table>
<tr>
<td>a</td>
<td>b<br />
b</td>
</tr>
<tr>
<td>c<br />
c</td>
<td>d</td>
</tr>
</table>

0 comments on commit 6a2a996

Please sign in to comment.