diff --git a/src/MathRenderer.php b/src/MathRenderer.php index 6eeb943..13f6042 100644 --- a/src/MathRenderer.php +++ b/src/MathRenderer.php @@ -214,7 +214,7 @@ abstract class MathRenderer { $mf = wfMessage( 'math_failure' )->inContentLanguage()->escaped(); $errmsg = wfMessage( $msg, $parameters )->inContentLanguage()->escaped(); $source = htmlspecialchars( str_replace( "\n", ' ', $this->tex ) ); - return "$mf ($errmsg): $source\n"; + return "$mf ($errmsg): $source\n"; } /** diff --git a/tests/ParserTest.json b/tests/ParserTest.json index fb45656..a37eaac 100644 --- a/tests/ParserTest.json +++ b/tests/ParserTest.json @@ -2123,7 +2123,7 @@ { "input": " with a thumbnail- we don't render math in the parsertests by default, so math is not stripped and turns up as escaped <math> tags. [[Image:foobar.jpg|thumb|2+2", "params": [], - "output": "Failed to parse (syntax error): {\\displaystyle with a thumbnail- we don't render math in the parsertests by default, so math is not stripped and turns up as escaped &lt;math&gt; tags. [[Image:foobar.jpg|thumb|<math>2+2}<\/strong>\n" + "output": "Failed to parse (syntax error): {\\displaystyle with a thumbnail- we don't render math in the parsertests by default, so math is not stripped and turns up as escaped &lt;math&gt; tags. [[Image:foobar.jpg|thumb|<math>2+2}<\/strong>\n" }, { "input": " with a thumbnail- math enabled [[Image:foobar.jpg|thumb|2+2", @@ -2293,12 +2293,12 @@ { "input": "", "params": [], - "output": "Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n" + "output": "Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n" }, { "input": " ", "params": [], - "output": "Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n" + "output": "Failed to parse (Conversion error. Server ("https:\/\/wikimedia.org\/api\/rest_") reported: "Cannot get mml. Expected width > 0."): {\\displaystyle }<\/strong>\n" }, { "input": "\\left(\\begin{smallmatrix}a & b\\\\ c & d\\end{smallmatrix}\\right)", @@ -2310,4 +2310,4 @@ "params": [], "output": "\"{\\displaystyle" } -] \ No newline at end of file +]