mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-09-23 10:21:31 +00:00
Fix genFrac bracket sizes
* genFrac renderMML function with bracket can produce false stretching on Chrome * fixed for the cases with brackets (dbinom, tbinom, binom) Bug: T350735 Change-Id: I0939de86963fa9c226346ce15e7edf7fc4e83c68
This commit is contained in:
parent
a4c3a365af
commit
9abb258422
|
@ -292,10 +292,10 @@ class BaseParsing {
|
|||
|
||||
// tbd add props
|
||||
$displayStyle = "true";
|
||||
$styleAttr = [ "maxsize" => "2.047em", "minsize" => "2.047em" ];
|
||||
$styleAttr = [ "minsize" => "2.047em" ];
|
||||
|
||||
} else {
|
||||
$styleAttr = [ "maxsize" => "1.2em", "minsize" => "1.2em" ];
|
||||
$styleAttr = [ "minsize" => "1.2em" ];
|
||||
}
|
||||
|
||||
/* @phan-suppress-next-line SecurityCheck-DoubleEscaped */
|
||||
|
|
|
@ -15,6 +15,12 @@ use MediaWikiUnitTestCase;
|
|||
* @covers \MediaWiki\Extension\Math\TexVC\TexVC
|
||||
*/
|
||||
class MMLRenderTest extends MediaWikiUnitTestCase {
|
||||
public function testGenfracStretching() {
|
||||
$input = "\\tbinom{n}{k} \\dbinom{n}{k} \\binom{n}{k}";
|
||||
$mathMLtexVC = $this->generateMML( $input );
|
||||
$this->assertStringNotContainsString( "maxsize", $mathMLtexVC );
|
||||
}
|
||||
|
||||
public function testBracketSizes() {
|
||||
$input = "\bigl( \Bigl( \biggl( \Biggl( ";
|
||||
$texVC = new TexVC();
|
||||
|
|
Loading…
Reference in a new issue