Fix Pilcrow size

* Pilcrow was very big, see test on MatTestNative page:
* " \amalg \P \S \% \dagger \ddagger \ldots \cdots "
* and add specific testcase

Bug : T315978

Change-Id: I3074f3782ef821e7f9813b79a570bbd51ead28db
This commit is contained in:
Stegmujo 2023-09-20 14:40:57 +00:00
parent d109aec95e
commit 586d15b046
2 changed files with 11 additions and 3 deletions

View file

@ -654,10 +654,12 @@ class BaseParsing {
switch ( $name ) {
case "oint":
case "\\P":
$mo = new MMLmo();
return $mrow->encapsulateRaw( $mStyle->encapsulateRaw(
$mo->encapsulateRaw( MMLutil::uc2xNotation( $uc ) ) ) );
case "\\P":
$mo = new MMLmo();
return $mo->encapsulateRaw( MMLutil::uc2xNotation( $uc ) );
case "oiint":
case "oiiint":
case "ointctrclockwise":

View file

@ -15,16 +15,22 @@ use MediaWikiUnitTestCase;
*/
class MMLRenderTest extends MediaWikiUnitTestCase {
public function testPilcrow() {
$input = "\P";
$mathMLtexVC = $this->generateMML( $input );
$this->assertStringContainsString( "<mo>&#xB6;</mo>\n</math>", $mathMLtexVC );
}
public function testLesserThan() {
$input = "<, \\nless,";
$mathMLtexVC = $this->generateMML( $input );
$this->assertTrue( str_contains( $mathMLtexVC, " <mo>&lt;</mo>" ) );
$this->assertStringContainsString( "<mo>&lt;</mo>", $mathMLtexVC );
}
public function testSidesetError() {
$input = "\\sideset{_1^2}{_3^4}";
$mathMLtexVC = $this->generateMML( $input );
$this->assertTrue( str_contains( $mathMLtexVC, "merror" ) );
$this->assertStringContainsString( "merror", $mathMLtexVC );
}
public function testSidesetSum() {