Bug 31824: Fix for the empty math tag
It fixes the bug by returning an empty string if the math tag is empty. Parser tests and changes so that white-text only works. Change-Id: Ica0dbb9bcfc709331e348fb11d24673103be3b37
This commit is contained in:
parent
c005843d62
commit
e5e574604b
|
@ -382,6 +382,10 @@ class MathRenderer {
|
|||
}
|
||||
|
||||
public static function renderMath( $tex, $params = array(), ParserOptions $parserOptions = null ) {
|
||||
if( trim( $tex ) == "" ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
$math = new MathRenderer( $tex, $params );
|
||||
if ( $parserOptions ) {
|
||||
$math->setOutputMode( $parserOptions->getMath() );
|
||||
|
|
|
@ -165,3 +165,18 @@ BUG 31442: Math accents with math font fail to parse if braces not used
|
|||
<p><img class="tex" alt="\tilde \mathcal{M}" src="/images/math/5/5/0/55072ce6ef8c840c4b7687bd8a028bde.png" />
|
||||
</p>
|
||||
!! end
|
||||
|
||||
!! test
|
||||
BUG 31824: Empty math tag returns uniq
|
||||
!! input
|
||||
<math></math>
|
||||
!! result
|
||||
!! end
|
||||
|
||||
!! test
|
||||
BUG 31824: Empty math tag returns uniq
|
||||
!! input
|
||||
<math> </math>
|
||||
!! result
|
||||
!! end
|
||||
|
||||
|
|
Loading…
Reference in New Issue