mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 06:56:13 +02:00
parent
76bae60d9b
commit
a19bf47d03
2 changed files with 33 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue