Skip to content

Commit fbb1956

Browse files
author
Tadeusz Sośnierz
committed
Allow '|' and '+' cell separators
1 parent 8e69807 commit fbb1956

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

lib/Pod6/Grammar.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ grammar Pod6::Grammar {
157157
}
158158

159159
token table_row {
160-
\h* <table_cell> ** [ \h\h+ ] \n
160+
\h* <table_cell> ** [ \h+'|'\h+ || \h+'+'\h+ || \h\h+ ] \n
161161
}
162162

163163
token table_cell {

t/08-tables.t

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,19 @@ is $r.content[1][1], '10';
4949
is $r.content[2][1], '33';
5050
is $r.content[3][1], '57';
5151

52+
$x = q[
53+
=for table
54+
mouse | mice
55+
horse | horses
56+
elephant | elephants
57+
];
58+
59+
$r = Pod6::parse($x);
60+
is $r.content[0][0], 'mouse';
61+
is $r.content[0][1], 'mice';
62+
is $r.content[1][0], 'horse';
63+
is $r.content[1][1], 'horses';
64+
is $r.content[2][0], 'elephant';
65+
is $r.content[2][1], 'elephants';
66+
5267
done;

0 commit comments

Comments
 (0)