diff --git a/src/reader/markdown.jl b/src/reader/markdown.jl index dc79581..a9d2497 100644 --- a/src/reader/markdown.jl +++ b/src/reader/markdown.jl @@ -5,7 +5,7 @@ function parse_markdown(document_body; is_pandoc = false) r"^<<(?.*?)>>=\s*$", r"^@\s*$" else - r"^[`~]{3}(\{?)julia\s*([;,]?)\s*(?.*?)(\}|\s*)$", + r"^[`~]{3}(\{?)julia\s*([;,\{]?)\s*(?.*?)(\}|\s*)$", r"^[`~]{3}\s*$" end return header, parse_markdown_body(document_body, code_start, code_end, offset) diff --git a/test/reader/test_chunk_options.jl b/test/reader/test_chunk_options.jl index 91ba5f9..3fbaaf9 100644 --- a/test/reader/test_chunk_options.jl +++ b/test/reader/test_chunk_options.jl @@ -72,6 +72,10 @@ let opts = get_options("```julia, opt1 = 1, opt2 = \"2\"\n```") @test (:opt1 => 1) in opts @test (:opt2 => "2") in opts end +let opts = get_options("```julia{opt1 = 1, opt2 = \"2\"}\n```") + @test (:opt1 => 1) in opts + @test (:opt2 => "2") in opts +end end diff --git a/test/test_display.jl b/test/test_display.jl index ea1b8fd..c8c36b4 100644 --- a/test/test_display.jl +++ b/test/test_display.jl @@ -6,7 +6,7 @@ doc = mock_run(""" ```julia using DataFrames -DataFrame(rand(10,3)) +DataFrame(a=rand(10)) ``` """; doctype = "md2html") @test isdefined(doc.chunks[1], :rich_output) @@ -17,7 +17,7 @@ n = 100000 doc = mock_run(""" ```julia using DataFrames -DataFrame(rand($n,3)) +DataFrame(a=rand($n)) ``` """; doctype = "md2html") @test isdefined(doc.chunks[1], :rich_output)