Skip to content

Commit

Permalink
return m.string to m.group(0); simplify and escape new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mpacer committed Dec 8, 2017
1 parent 6a2fd6b commit 1bc9118
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion nbconvert/filters/markdown_mistune.py
Expand Up @@ -49,7 +49,7 @@ def parse_multiline_math(self, m):
"""Add token to pass through mutiline math."""
self.tokens.append({
"type": "multiline_math",
"text": m.string
"text": m.group(0)
})


Expand Down
24 changes: 12 additions & 12 deletions nbconvert/filters/tests/test_markdown.py
Expand Up @@ -137,18 +137,18 @@ def test_markdown2html_math(self):
"$$a<b&b<lt$$",
"$$a<b&lt;b>a;a-b<0$$",
"$$<k'>$$",
"""$$x
=
2$$""",
r"""$$
b_{l_1,l_2,l_3}^{\phi\phi\omega} = -8\, l_1\times l_2 \,l_1\cdot l_2 \int_0^{\chi_*} d\chi \frac{W(\chi,\chi_*)^2}{\chi^2} \int_0^{\chi}d\chi' \frac{W(\chi',\chi)W(\chi',\chi_*)}{{\chi'}^2} \left[
P_\psi\left(\frac{l_1}{\chi},z(\chi)\right) P_\Psi\left(\frac{l_2}{\chi'},z(\chi')\right)
- (l_1\leftrightarrow l_2)
\right]
$$""",
r"""\begin{equation*}
x = 2 *55* 7
\end{equation*}""",
("$$x\\n"
"=\\n"
"2$$"),
("$$\\n"
"b = \\left[\\n"
"P\\left(\\right)\\n"
"- (l_1\\leftrightarrow l_2\\n)"
"\\right]"
"$$"),
("\\begin{equation*}\\n"
"x = 2 *55* 7"
"\\end{equation*}"),
"""$
\\begin{tabular}{ l c r }
1 & 2 & 3 \\
Expand Down

0 comments on commit 1bc9118

Please sign in to comment.