Skip to content

Commit b59c209

Browse files
committed
Add support for deprecated mode='display' attribute, and make sure it and display='block' sets displaystyle='true'.
1 parent ffeb86b commit b59c209

File tree

1 file changed

+3
-0
lines changed
  • mathjax3-ts/core/MmlTree/MmlNodes

1 file changed

+3
-0
lines changed

mathjax3-ts/core/MmlTree/MmlNodes/math.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ export class MmlMath extends AbstractMmlLayoutNode {
8787
* @override
8888
*/
8989
protected setChildInheritedAttributes(attributes: AttributeList, display: boolean, level: number, prime: boolean) {
90+
if (this.attributes.get('mode') === 'display') {
91+
this.attributes.setInherited('display', 'block');
92+
}
9093
attributes = this.addInheritedAttributes(attributes, this.attributes.getAllAttributes());
9194
display = (!!this.attributes.get('displaystyle') ||
9295
(!this.attributes.get('displaystyle') && this.attributes.get('display') === 'block'));

0 commit comments

Comments
 (0)