Merge "Ignore misplaced limits commands"

This commit is contained in:
jenkins-bot 2024-11-08 05:06:17 +00:00 committed by Gerrit Code Review
commit 0e0d5ff1f7
2 changed files with 5 additions and 3 deletions

View file

@ -930,7 +930,7 @@ class BaseParsing {
}
}
$mrow = new MMLmrow( TexClass::ORD, [] );
$opParsed = ( $operatorContent != null && $operatorContent["limits"] )
$opParsed = ( $operatorContent["limits"] ?? false )
? $operatorContent["limits"]->renderMML( $argsOp ) : "";
if ( $node instanceof DQ ) {
@ -940,6 +940,9 @@ class BaseParsing {
$munderOver = new MMLmunderover();
return $munderOver->encapsulateRaw( $opParsed . $mrow->encapsulateRaw( $node->getDown()->renderMML() )
. $mrow->encapsulateRaw( $node->getUp()->renderMML() ) );
} elseif ( $name === 'limits' || $name === 'nolimits' ) {
// Don't render limits
return '';
}
}

View file

@ -118,8 +118,7 @@ class Literal extends TexNode {
$ret = BaseMethods::checkAndParse( $inputP, $arguments,
array_merge( $operatorContent ?? [], $state ?? [] ),
$this, false );
if ( $ret ) {
if ( $ret || $ret === '' ) {
return $ret;
}