Merge "Treat colon as operator"

This commit is contained in:
jenkins-bot 2024-11-10 21:43:02 +00:00 committed by Gerrit Code Review
commit 5fbcff7819
2 changed files with 7 additions and 0 deletions

View file

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

View file

@ -100,4 +100,10 @@ class LiteralTest extends MediaWikiUnitTestCase {
'double vertical line should render as special operator.' ); '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.' );
}
} }