From d399f3040ce4b08b74452daaf9f1a237e390cd22 Mon Sep 17 00:00:00 2001 From: Waylon Flinn Date: Thu, 21 Apr 2016 17:40:44 -0500 Subject: [PATCH] all tests from markdown-it-math --- test/fixtures/default.txt | 159 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 159 insertions(+) diff --git a/test/fixtures/default.txt b/test/fixtures/default.txt index eb66ce3..8b9119c 100644 --- a/test/fixtures/default.txt +++ b/test/fixtures/default.txt @@ -13,3 +13,162 @@ $$1+1 = 2$$ 1+1=21+1 = 2 . + +No whitespace before and after is fine +. +foo$1+1 = 2$bar +. +

foo1+1=21+1 = 2bar

+. + +Even when it starts with a negative sign +. +foo$-1+1 = 2$bar +. +

foo1+1=2-1+1 = 2bar

+. + +Paragraph break in inline math is not allowed +. +foo $1+1 + += 2$ bar +. +

foo $1+1

+

= 2$ bar

+. + +Neither is an end of document +. +foo $1+1 = 2 +. +

foo $1+1 = 2

+. + +Inline math with apparent markup +. +foo $1 *i* 1$ bar +. +

foo 1i11 *i* 1 bar

+. + +Block math can be indented up to 3 spaces +. + $$ + 1+1 = 2 + $$ +. +1+1=21+1 = 2 + +. + +But 4 means a code block +. + $$ + 1+1 = 2 + $$ +. +
$$
+1+1 = 2
+$$
+
+. + + +Multiline inline math +. +foo $1 + 1 += 2$ bar +. +

foo 1+1=21 + 1 += 2 bar

+. + + +Multiline display math +. +$$ + + 1 ++ 1 + += 2 + +$$ +. +1+1=2 + 1 ++ 1 + += 2 + + +. + +Text can immediately follow inline math +. +$n$-th order +. +

nn-th order

+. + + +Display math self-closes at the end of document +. +$$ +1+1 = 2 +. +1+1=21+1 = 2 + +. + + +Display and inline math can appear in lists +. +* $1+1 = 2$ +* $$ + 1+1 = 2 + $$ +. + +. + +Display math can be written in one line +. +$$1+1 = 2$$ +. +1+1=21+1 = 2 + +. + +Or on multiple lines with expression starting and ending on delimited lines +. +$$[ +[1, 2] +[3, 4] +]$$ +. +[[1,2][3,4]][ +[1, 2] +[3, 4] +] +. + +Escaped delimiters should not render math +. +Foo \$1$ bar +\$\$ +1 +\$\$ +. +

Foo $1$ bar +$$ +1 +$$

+.