diff --git a/src/converter/md.jl b/src/converter/md.jl index 54d12e122..5dd763997 100644 --- a/src/converter/md.jl +++ b/src/converter/md.jl @@ -205,7 +205,14 @@ function form_inter_md(mds::AS, blocks::Vector{<:AbstractBlock}, if isa(β, OCBlock) && β.name ∈ MD_OCB_IGNORE head = nextind(mds, to(β)) else - write(intermd, INSERT) + if isa(β, OCBlock) && β.name ∈ MD_HEADER + # this is a trick to allow whatever follows the title to be + # properly parsed by Markdown.parse; it could otherwise cause + # issues for instance if a table starts immediately after the title + write(intermd, INSERT * "\n ") + else + write(intermd, INSERT) + end push!(mblocks, β) head = nextind(mds, to(blocks[b_idx])) end diff --git a/test/global/cases2.jl b/test/global/cases2.jl index ff5d00e81..0823fc40b 100644 --- a/test/global/cases2.jl +++ b/test/global/cases2.jl @@ -58,3 +58,23 @@ end
The end.
""") end + + +@testset "Table" begin + st = """ + A + + ### Title + + No. | Graph | Vertices | Edges + :---: | :---------: | :------------: | :-----------------: + 1 | Twitter Social Circles | 81,306 | 1,342,310 + 2 | Astro-Physics Collaboration | 17,903 | 197,031 + 3 | Facebook Social Circles | 4,039 | 88,234 + + C + """ * J.EOS + st |> seval + + st |> Markdown.parse +end