mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-23 15:16:56 +00:00
Merge "Treat ! as operator"
This commit is contained in:
commit
fb4e72d64c
|
@ -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