mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fixup 216a6fb3
: 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.
This commit is contained in:
parent
fb919e653d
commit
a268fe096a
@ -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