Skip to content

Commit 3b3a583

Browse files
committed
Allow spaces around pipes
1 parent d263a2c commit 3b3a583

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/rdoc/markdown.kpeg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,8 +1212,8 @@ TableItem = < (!"|" !@Newline .)+ >
12121212

12131213
TableLine = ( ( TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] } ):line | TableAlign2+:line ) "|"? @Newline
12141214
{ line }
1215-
TableAlign2 = "|" TableAlign
1216-
TableAlign = < /:?-+:?/ >
1215+
TableAlign2 = "|" @Sp TableAlign
1216+
TableAlign = < /:?-+:?/ > @Sp
12171217
{ text.start_with?(":") ? :left :
12181218
text.end_with?(":") ? :right : nil
12191219
}

test/rdoc/test_rdoc_markdown.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1065,7 +1065,7 @@ def test_gfm_table
10651065
def test_gfm_table_2
10661066
doc = parse <<~MD
10671067
| Cmd | Returns | Meaning
1068-
------|---------|--------
1068+
----- | ------- | -------
10691069
|"b" | boolean | True if file1 is a block device
10701070
"c" | boolean | True if file1 is a character device
10711071
MD

0 commit comments

Comments
 (0)