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
a268fe096a58a7818554a7da4da85896bb289c81)
} 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");
}
}
///
MathMLStream & ms_;
///
- bool old_text_level_;
+ int old_text_level_;
};