Merge "Treat ! as operator"

This commit is contained in:
jenkins-bot 2024-11-14 09:13:19 +00:00 committed by Gerrit Code Review
commit fb4e72d64c
2 changed files with 7 additions and 0 deletions

View file

@ -16,6 +16,7 @@ class OperatorDictionary {
private static $instance = null;
private const INFIX = [ // Implemented elements have [something, true] for custom parsing
'!' => [ "1, 0, TEXCLASS.CLOSE, null" ], // exclamation mark
'!=' => [ " exports.MO.BIN4" ],
'#' => [ " exports.MO.ORD" ],
'$' => [ " exports.MO.ORD" ],

View file

@ -118,4 +118,10 @@ class LiteralTest extends MediaWikiUnitTestCase {
'| should render as special operator.' );
}
public function testExclamationMark() {
$n = new Literal( '!' );
$this->assertStringContainsString( '!</mo>', $n->renderMML(),
'exclamation mark should render as special operator.' );
}
}