Skip to content

Commit 8de4268

Browse files
authored
fix markdown parser failed for tables with no first column (#38189) (#38395)
1 parent 5bfad56 commit 8de4268

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

stdlib/Markdown/src/GitHub/table.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ function github_table(stream::IO, md::MD)
4545
align = nothing
4646
while (row = parserow(stream)) !== nothing
4747
if length(rows) == 0
48-
isempty(row[1]) && return false
4948
cols = length(row)
5049
end
5150
if align === nothing && length(rows) == 1 # Must have a --- row

stdlib/Markdown/test/runtests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,12 @@ foo()
493493
["hgh",Bold("jhj"),"ge"],
494494
"f"]],
495495
[:l, :r, :r]))
496+
@test md"""
497+
| | b |
498+
|:--|--:|
499+
| 1 | |""" == MD(Table(Any[[Any[],"b"],
500+
["1",Any[]]], [:l, :r]))
501+
496502
@test md"""
497503
no|table
498504
no error

0 commit comments

Comments
 (0)