]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathScript.cpp
Revert part of 503c7c16: InsetMathNest:edit resets anchor.
[features.git] / src / mathed / InsetMathScript.cpp
index 9f391f66f93e03dfb428a0f0f9eb00624ac9d939..73e1ef9d91976a6eb793810fe09356de3226aca3 100644 (file)
@@ -611,7 +611,7 @@ void InsetMathScript::mathmlize(MathMLStream & ms) const
        if (!d && !u)
                return;
 
-       const char * tag;
+       const char * tag = nullptr;
        if (u && d)
                tag = has_limits ? "munderover" : "msubsup";
        else if (u)
@@ -624,12 +624,15 @@ void InsetMathScript::mathmlize(MathMLStream & ms) const
        if (!nuc().empty())
                ms << nuc();
        else
+               // TODO: is this empty <mrow> required?
                ms << CTag("mrow");
 
+       // No need to wrap these in an <mrow>, as it's done by MathExtern.
+       // More details in https://www.lyx.org/trac/ticket/12221#comment:10.
        if (d)
-               ms << MTag("mrow") << down() << ETag("mrow");
+               ms << down();
        if (u)
-               ms << MTag("mrow") << up() << ETag("mrow");
+               ms << up();
 
        ms << ETag(tag);
 }