Skip to content

Commit

Permalink
Add 2 test cases
Browse files Browse the repository at this point in the history
Added one test case to check that math blocks render correctly when preceeded by an alphanumerical character, and another one for when it is succeeded by an alphanumerical character.

Signed-off-by: João Tiago <[email protected]>
  • Loading branch information
jmlt2002 committed Mar 29, 2024
1 parent 1edf43a commit e375bf3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/markup/markdown/markdown_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,14 @@ func TestMathBlock(t *testing.T) {
`a$b $a a$b b$`,
`<p>a<code class="language-math is-loading">b </code>a a<code class="language-math is-loading">b b</code></p>` + nl,
},
{
"a$x$",
`<p>a<code class="language-math is-loading">x</code></p>` + nl,
},
{
"$x$a",
`<p><code class="language-math is-loading">x</code>a</p>` + nl,
},
{
"$$a$$",
`<pre class="code-block is-loading"><code class="chroma language-math display">a</code></pre>` + nl,
Expand Down

0 comments on commit e375bf3

Please sign in to comment.