aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/markdown_math_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/markdown/markdown_math_test.go')
-rw-r--r--modules/markup/markdown/markdown_math_test.go20
1 files changed, 19 insertions, 1 deletions
diff --git a/modules/markup/markdown/markdown_math_test.go b/modules/markup/markdown/markdown_math_test.go
index a2213b2ce7..813f050965 100644
--- a/modules/markup/markdown/markdown_math_test.go
+++ b/modules/markup/markdown/markdown_math_test.go
@@ -12,8 +12,9 @@ import (
"github.com/stretchr/testify/assert"
)
+const nl = "\n"
+
func TestMathRender(t *testing.T) {
- const nl = "\n"
testcases := []struct {
testcase string
expected string
@@ -86,6 +87,18 @@ func TestMathRender(t *testing.T) {
`$\text{$b$}$`,
`<p><code class="language-math">\text{$b$}</code></p>` + nl,
},
+ {
+ "a$`b`$c",
+ `<p>a<code class="language-math">b</code>c</p>` + nl,
+ },
+ {
+ "a $`b`$ c",
+ `<p>a <code class="language-math">b</code> c</p>` + nl,
+ },
+ {
+ "a$``b``$c x$```y```$z",
+ `<p>a<code class="language-math">b</code>c x<code class="language-math">y</code>z</p>` + nl,
+ },
}
for _, test := range testcases {
@@ -215,6 +228,11 @@ x
</ol>
`,
},
+ {
+ "inline-non-math",
+ `\[x]`,
+ `<p>[x]</p>` + nl,
+ },
}
for _, test := range testcases {