Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow '|' and '+' cell separators
  • Loading branch information
Tadeusz Sośnierz committed Jul 5, 2011
1 parent 8e69807 commit fbb1956
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Pod6/Grammar.pm
Expand Up @@ -157,7 +157,7 @@ grammar Pod6::Grammar {
}

token table_row {
\h* <table_cell> ** [ \h\h+ ] \n
\h* <table_cell> ** [ \h+'|'\h+ || \h+'+'\h+ || \h\h+ ] \n
}

token table_cell {
Expand Down
15 changes: 15 additions & 0 deletions t/08-tables.t
Expand Up @@ -49,4 +49,19 @@ is $r.content[1][1], '10';
is $r.content[2][1], '33';
is $r.content[3][1], '57';

$x = q[
=for table
mouse | mice
horse | horses
elephant | elephants
];

$r = Pod6::parse($x);
is $r.content[0][0], 'mouse';
is $r.content[0][1], 'mice';
is $r.content[1][0], 'horse';
is $r.content[1][1], 'horses';
is $r.content[2][0], 'elephant';
is $r.content[2][1], 'elephants';

done;

0 comments on commit fbb1956

Please sign in to comment.