]> git.lyx.org Git - lyx.git/commitdiff
Revert "MathML: don't output delimiters in InsetMathBinom and InsetMathDelim if the...
authorPavel Sanda <sanda@lyx.org>
Fri, 27 Oct 2023 19:18:45 +0000 (21:18 +0200)
committerPavel Sanda <sanda@lyx.org>
Fri, 27 Oct 2023 19:18:45 +0000 (21:18 +0200)
This reverts commit be44cb85165, see #12891.

src/mathed/InsetMathDelim.cpp
src/mathed/InsetMathFrac.cpp

index 18f3ffbae2f50951c096c53151d808f2ad38aa3e..486ed97580d94a9233e5b2ff5a0b1e99f85021f7 100644 (file)
@@ -181,19 +181,15 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 
 void InsetMathDelim::mathmlize(MathMLStream & ms) const
 {
-       if (left_.empty() || (left_.size() == 1 && left_[0] == ' ')) {
-               ms << MTag("mrow")
-                  << MTagInline("mo", "form='prefix' fence='true' stretchy='true' symmetric='true'")
-                  << convertDelimToXMLEscape(left_)
-                  << ETagInline("mo");
-       }
-       ms << cell(0);
-       if (right_.empty() || (right_.size() == 1 && right_[0] == ' ')) {
-               ms << MTagInline("mo", "form='postfix' fence='true' stretchy='true' symmetric='true'")
-                  << convertDelimToXMLEscape(right_)
-                  << ETagInline("mo")
-                  << ETag("mrow");
-       }
+       ms << MTag("mrow")
+          << MTagInline("mo", "form='prefix' fence='true' stretchy='true' symmetric='true'")
+          << convertDelimToXMLEscape(left_)
+          << ETagInline("mo")
+          << cell(0)
+          << MTagInline("mo", "form='postfix' fence='true' stretchy='true' symmetric='true'")
+          << convertDelimToXMLEscape(right_)
+          << ETagInline("mo")
+          << ETag("mrow");
 }
 
 
index 5bed1a1fa6902666630f4f34ea93eb1eaa3d38af..f6f2f95b0a7822249a12693d36b70a12ee997de4 100644 (file)
@@ -768,20 +768,15 @@ void InsetMathBinom::mathmlize(MathMLStream & ms) const
                rdelim = ']';
                break;
        }
-
-       if (ldelim != ' ') {
-               ms << MTagInline("mo", "fence='true' stretchy='true' form='prefix'")
-                  << ldelim
-                  << ETagInline("mo");
-       }
-       ms << MTagInline("mfrac", "linethickness='0'")
+       ms << MTagInline("mo", "fence='true' stretchy='true' form='prefix'")
+          << ldelim
+          << ETagInline("mo")
+          << MTagInline("mfrac", "linethickness='0'")
           << cell(0) << cell(1)
-       << ETagInline("mfrac");
-       if (rdelim != ' ') {
-               ms << MTagInline("mo", "fence='true' stretchy='true' form='postfix'")
-                  << rdelim
-                  << ETagInline("mo");
-       }
+       << ETagInline("mfrac")
+          << MTagInline("mo", "fence='true' stretchy='true' form='postfix'")
+          << rdelim
+          << ETagInline("mo");
 }