check_equal"Should convert bold and italic in a sentence""<p>It <i>is</i> a <b>wonderful</b> day</p>"(convert"It _is_ a __wonderful__ day"),
check_equal"Should convert nested bold and italic""<p><b>Bold then <i>Italic</i></b></p>"(convert"**Bold then *Italic***"),
@ -98,9 +97,23 @@ codeTests =
TestList
[check_equal"Code by itself""<p><code>Hello world!</code></p>"(convert"`Hello world!`"),
check_equal"Code in a paragraph""<p>The following <code>text</code> is code</p>"(convert"The following `text` is code"),
check_equal"Code across paragraphs (shouldn't work""<p>`Incomplete</p><p>Code`</p>"(convert"`Incomplete\n\nCode`")
check_equal"Code across paragraphs (shouldn't work""<p></p><p></p>"(convert"`Incomplete\n\nCode`")-- At the moment, this is just treated as a syntax error, so nothing is rendered.
]
imageTests=
TestList
[check_equal"Image with text""<p>This is an image <img src=\"img.png\" alt=\"Image 1\" /></p>"(convert"This is an image ")
]
figureTests=
TestList
[check_equal"Image by itself""<figure><img src=\"img.png\" alt=\"Image 1\"/><figcaption aria-hidden=\"true\">Image 1</figcaption></figure>"(convert"")
[check_equal"Integration 1""<h1>Sample Markdown</h1><p>This is some basic, sample markdown.</p><h2><b>Second</b> <i>Heading</i></h2>"(convert"# Sample Markdown\n\n This is some basic, sample markdown.\n\n ## __Second__ _Heading_"),