@@ -11,9 +11,13 @@ function interpinner(stream::IO, greedy = false)
1111 startswith (stream, ' $' ) || return
1212 (eof (stream) || peek (stream, Char) in whitespace) && return
1313 try
14- return _parse (stream:: IOBuffer , greedy = greedy)
14+ return _parse (stream, greedy = greedy)
1515 catch e
16- return
16+ if isa (e, Meta. ParseError)
17+ return nothing
18+ else
19+ rethrow ()
20+ end
1721 end
1822end
1923
3943
4044toexpr (x) = x
4145
42- toexpr (xs:: Vector{Any} ) = Expr (:call , GlobalRef (Base,:getindex ), Any, map (toexpr, xs)... )
46+ toexpr (xs:: Union{Vector{Any},Vector{Vector{Any}}} ) =
47+ Expr (:call , GlobalRef (Base,:getindex ), Any, map (toexpr, xs)... )
4348
4449for T in Any[MD, Paragraph, Header, Link, Bold, Italic]
4550 @eval function toexpr (md:: $T )
4651 Expr (:call , typeof (md), $ (map (x-> :(toexpr (md.$ x)), fieldnames (Base. unwrap_unionall (T)))... ))
4752 end
4853end
54+
55+ function toexpr (md:: Table )
56+ Expr (:call , Table, toexpr (md. rows), md. align)
57+ end
58+
59+ function toexpr (md:: List )
60+ Expr (:call , List, toexpr (md. items), md. ordered, md. loose)
61+ end
0 commit comments