mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-13 17:56:59 +00:00
Fix for attributes in named Operator
Bug: T315978 Change-Id: I7277d03bae031ffcb2995c097f92c795cc2637dd
This commit is contained in:
parent
c9cf3814ac
commit
6e0427c2ba
|
@ -529,6 +529,13 @@ class BaseParsing {
|
|||
|
||||
$args = count( $passedArgs ) >= 1 ? $passedArgs : [ "movablelimits" => "true" ];
|
||||
$texClass = TexClass::OP;
|
||||
|
||||
// This comes from inf case, preventing 'double'-classtag
|
||||
if ( isset( $args[Tag::CLASSTAG] ) ) {
|
||||
$texClass = $args[Tag::CLASSTAG];
|
||||
unset( $args[Tag::CLASSTAG] );
|
||||
}
|
||||
|
||||
if ( $name == "min" || $name == "max" || $name === "gcd" ) {
|
||||
$args["form" ] = "prefix";
|
||||
$texClass = "";
|
||||
|
|
|
@ -186,6 +186,13 @@ class MMLRenderTest extends MediaWikiUnitTestCase {
|
|||
$this->assertStringContainsString( "<mspace linebreak=\"newline\"/>", $mathMLtexVC );
|
||||
}
|
||||
|
||||
public function testAttributeDuplicate() {
|
||||
// This checks that there is some non-erronous output caused by double class attributes
|
||||
$input = "\\mu_{\\operatorname{\\inf}}";
|
||||
$mathMLtexVC = $this->generateMML( $input );
|
||||
$this->assertStringContainsString( "μ", $mathMLtexVC );
|
||||
}
|
||||
|
||||
private function generateMML( $input, $chem = false ) {
|
||||
$texVC = new TexVC();
|
||||
$resultT = $texVC->check( $input, [
|
||||
|
|
Loading…
Reference in a new issue