{ "math_block_tests": [ { "original_markup":"intro text\n\n```math\na + b = 33\n\n\n\n\n\n\n\nd+x = 44\n``` \n\nend", "description": "Math block containing expressions with absurd number of newlines between each other. Notice how eight newlines are replaced with nine newlines", "input": "

intro text

\n

a+b=33a + b = 33a+b=33\n\n\n\n\n\n\n\nd+x=44d+x = 44d+x=44\n

end

", "expected_output": "intro text\n\n```math\na + b = 33\n\n\n\n\n\n\n\n\nd+x = 44\n``` \n\nend" }, { "original_markup":"hello world\n\n```math\nc + x = 6\n\nc + a = 00\n```\n\nhi there\n\n```math\nc + xy = 55\n```", "input": "

hello world

c+x=6c + x = 6c+x=6c+a=00c + a = 00c+a=00

hi there

c+xy=55c + xy = 55c+xy=55

", "description": "Normal math block.", "expected_output": "hello world\n\n```math\nc + x = 6\n\nc + a = 00\n```\n\nhi there\n\n```math\nc + xy = 55\n```" }, { "original_markup":"```math\nc+d=55\n\n\nx + y = 99\n```", "description": "Selecting only math expression in math block.", "input": "

c+d=55\n\nx+y=99x + y = 99x+y=99

", "expected_output": "```math\nc+d=55\n\nx + y = 99\n```" } ], "inline_math_expression_tests": [ { "original_markup":"intro text\n$$p+q =4$$", "description": "Inline Expression 1.", "expected_output": "intro text\n$$p+q =4$$" }, { "original_markup":"intro text\n$$p+q =4$$\n$$x+y=z$$\nhello world", "description": "Inline Expression 2 (multiline).", "expected_output": "intro text\n$$p+q =4$$\n$$x+y=z$$\nhello world" }, { "original_markup":"hey there\n$$a+b$$ some text $$c+d$$\nhow", "description": "Inline expression with intermediate text node between two inline expressions.", "expected_output": "hey there\n$$a+b$$ some text $$c+d$$\nhow" }, { "original_markup":"I *think* $$e^{i\\pi} = -1$$ is the **coolest** thing I've seen since $$x^2 + y^2 = z^2$$ blew my mind.", "description": "Inline expression with bold and emphasized text.", "expected_output":"I *think* $$e^{i\\pi} = -1$$ is the **coolest** thing I've seen since $$x^2 + y^2 = z^2$$ blew my mind." }, { "original_markup":"there $$a+b$$ `some code` some text _hello_ `more code` $$y+z=4444$$ ~~don't read this~~ some text `code` $$p+q=44$$ text haha wooo", "expected_output":"there $$a+b$$ `some code` some text _hello_ `more code` $$y+z=4444$$ ~~don't read this~~ some text `code` $$p+q=44$$ text haha wooo", "description": "Inline expression with inline elements." }, { "description":"Nested inline katex siblings", "expected_output":"like ~~*this* is not $$x^2$$, it's $$xx/2$$, **see?**~~` good", "original_markup":"like ~~*this* is not $$x^2$$, it's $$xx/2$$, **see?**~~` good" },{ "description":"Another katex inline expression containing nested tags", "expected_output":"world ~~it works **out $$a+b=c$$** so `well` if you try *this*** not $$p+q=r$$ that~~ good good", "original_markup":"world ~~it works **out $$a+b=c$$** so `well` if you try *this*** not $$p+q=r$$ that~~ good good" },{ "original_markup":"$$a^{b^{c}}$$", "expected_output":"$$a^{b^{c}}$$" } ], "text_node_to_span_conversion_tests":[ { "original_markup":"A paragraph with some `code` and a [link](https://example.com/).", "description":"Check conversion of intermediate text nodes and ensure it doesn't distubt pasting/quoting", "expected_output":"A paragraph with some `code` and a [link](https://example.com/)." } ] }