mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 23:25:02 +00:00
Treat ! as operator
Bug: T375935 Change-Id: Iec8e69d28fa3cc32b2c2e87f81707b9fd7af5576
This commit is contained in:
parent
aee95695b8
commit
5cde747b49
|
@ -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" ],
|
||||
|
|
|
@ -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.' );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue