# TODO: make this more sensible: # - separate tests for # 1. features that are "copy-and-pasted" from `Markdown` module # 2. features that are extended by Weave using Weave: WeaveMarkdown, Markdown # Test markdown2html writer html = WeaveMarkdown.html(Markdown.parse(""" # H1 ## H2 ## H3 Some **text** with different [^note] *formatting* and \$math\$ and text. `some code` with [link](http://github.com) [^note]: test note --- \$more math\$ * List one * List two 1. List one 2. List two ```julia x = 3 ``` !!! note "Something" Test admonition with ![Image](link/to/image.png) > Some important quote head 1 | head 2 -------|-------- `code` | no code """, flavor = WeaveMarkdown.weavemd)) ref_html = """

H1

H2

H3

Some text with different [note] formatting and \$math\$ and text.

some code with link

note

test note


\\[ more math \\]

  1. List one

  2. List two

x = 3

Something

Test admonition with \"Image\"

Some important quote

head 1head 2
codeno code
""" @test html == ref_html #Test Weave additions md = Markdown.parse(""" Multiline equations \$\$ x = 2 \$\$ And comments """, flavor = WeaveMarkdown.weavemd); @test md.content[2].formula == "x = 2" @test typeof(md.content[3].content[2]) == WeaveMarkdown.Comment @test md.content[3].content[2].text == " inline " @test md.content[4].text == "\nMultiple lines\n " @test WeaveMarkdown.latex(md.content[2]) == "\\[\nx = 2\n\\]\n" @test WeaveMarkdown.latex(md.content[4]) == "% \n% Multiple lines\n% \n" @test WeaveMarkdown.html(md.content[2]) == "

\\[\nx = 2\n\\]

" @test WeaveMarkdown.html(md.content[4]) == "\n\n"