Treat colon as operator

Bug: T375974
Change-Id: Ia553e77a04edfee12fa0f236375d67a88eefee67
This commit is contained in:
physikerwelt 2024-11-09 06:33:07 +01:00
parent cc0a214f56
commit fcb667f733
No known key found for this signature in database
GPG key ID: FCC793EFFA5FB13C
2 changed files with 7 additions and 0 deletions

View file

@ -33,6 +33,7 @@ class OperatorDictionary {
'-=' => [ " exports.MO.BIN4" ],
'->' => [ " exports.MO.BIN5" ],
'.' => [ " [0, 3], MmlNode_js_1.TEXCLASS.PUNCT\"], { separator=> [ true }]" ],
':' => [ " [1, 2], MmlNode_js_1.TEXCLASS.REL\"], null]" ],
'/' => [ " exports.MO.ORD11" ],
'//' => [ " OPDEF(1\"], 1)" ],
'/=' => [ " exports.MO.BIN4" ],

View file

@ -100,4 +100,10 @@ class LiteralTest extends MediaWikiUnitTestCase {
'double vertical line should render as special operator.' );
}
public function testColon() {
$n = new Literal( ':' );
$this->assertStringContainsString( ':</mo>', $n->renderMML(),
'colon should render as special operator.' );
}
}