mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fixup b29b3eb1
: fix broken xml syntax
This commit addresses two issues:
1/ the embarassing one: the member SetMode::old_text_level_ was
declared as bool instead of int. This means that is was definitely
not a proper backup variable!
2/ a robustness issue: replace two consecutive test for isTest() by a
boolean veriable that is used twice. This makes sure that <mrow>
cannot be output without the corresponding </mrow>.
Part of bug #13069.
(cherry picked from commit a268fe096a
)
This commit is contained in:
parent
a0752e4dfc
commit
8ea0987644
@ -1646,11 +1646,13 @@ void mathmlize(MathData const & dat, MathMLStream & ms)
|
||||
} else if (ar.size() == 1) {
|
||||
ms << ar.front();
|
||||
} else {
|
||||
if (!ms.inText())
|
||||
// protect against the value changing in the second test.
|
||||
bool const intext = ms.inText();
|
||||
if (!intext)
|
||||
ms << MTag("mrow");
|
||||
for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it)
|
||||
(*it)->mathmlize(ms);
|
||||
if (!ms.inText())
|
||||
if (!intext)
|
||||
ms << ETag("mrow");
|
||||
}
|
||||
}
|
||||
|
@ -469,7 +469,7 @@ private:
|
||||
///
|
||||
MathMLStream & ms_;
|
||||
///
|
||||
bool old_text_level_;
|
||||
int old_text_level_;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user