[ruby/rdoc] Allow trailing pipes to be ommitted

1318048877
This commit is contained in:
Nobuyoshi Nakada 2022-10-06 13:10:31 +09:00
parent 76bae60d9b
commit a19bf47d03
2 changed files with 33 additions and 4 deletions

View file

@ -1062,6 +1062,25 @@ and an extra note.[^2]
assert_equal expected, doc
end
def test_gfm_table_2
doc = parse <<~MD
| Cmd | Returns | Meaning
|-----|---------|--------
| "b" | boolean | True if file1 is a block device
| "c" | boolean | True if file1 is a character device
MD
head = %w[Cmd Returns Meaning]
align = [nil, nil, nil]
body = [
['"b"', 'boolean', 'True if file1 is a block device'],
['"c"', 'boolean', 'True if file1 is a character device'],
]
expected = doc(@RM::Table.new(head, align, body))
assert_equal expected, doc
end
def parse text
@parser.parse text
end