From 402043b0ccc52b865820ab7d0a078253d0b0b90b Mon Sep 17 00:00:00 2001 From: EvgeniyIgol Date: Thu, 30 Oct 2025 10:37:54 +0300 Subject: [PATCH] Fix bug #77925 --- word/Math/math-ml.js | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/word/Math/math-ml.js b/word/Math/math-ml.js index aa6a46a958..a27ad3bec1 100644 --- a/word/Math/math-ml.js +++ b/word/Math/math-ml.js @@ -228,8 +228,14 @@ return result; } - function proceedAttributes(name, text, attributes) + function proceedAttributes(data) { + let name = data.name; + let text = data.text; + let attributes = data.attributes; + let oThis = data.oThis; + let parentMathContent = data.parentMathContent; + const GetMathFontChar = AscMath.GetMathFontChar; switch (name) { @@ -274,11 +280,11 @@ case 'mo': { if (attributes['id']) - this.mathMLData['mo-id'][attributes['id']] = elements[0]; + oThis.mathMLData['mo-id'][attributes['id']] = elements[0]; if (attributes['linebreak']) { - this.mathMLData['mo-linebreak-todo'].push({ + oThis.mathMLData['mo-linebreak-todo'].push({ element: elements[0], type: attributes['linebreak'], indentalign: attributes['indentalign'] === "id", @@ -287,7 +293,7 @@ } // indent - if (attributes['movablelimits']) + if (attributes['movablelimits'] && parentMathContent) { parentMathContent.mathml_metadata['movablelimits'] = attributes['movablelimits']; } @@ -350,7 +356,13 @@ break; text = decodeHexEntities(text); - text = proceedAttributes(name, text, attributes); + text = proceedAttributes({ + name: name, + text: text, + attributes: attributes, + oThis: this, + parentMathContent: parentMathContent + }); text = text.replaceAll(" ", " "); if (text)