[LyX/master] MathStream: better order for the calls to tab() and cr().
Thibaut Cuvelier
tcuvelier at lyx.org
Sun Dec 5 18:44:46 UTC 2021
commit a81dd6518af8ab9b2fc9cf09f38dea5746c2375e
Author: Thibaut Cuvelier <tcuvelier at lyx.org>
Date: Sun Dec 5 19:15:06 2021 +0100
MathStream: better order for the calls to tab() and cr().
Part of https://www.lyx.org/trac/attachment/ticket/12221/0006-amends-to-a579128c-a68e9793-a68e9793.patch by lynx.
---
src/mathed/MathStream.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp
index a6d160c..a05e54a 100644
--- a/src/mathed/MathStream.cpp
+++ b/src/mathed/MathStream.cpp
@@ -361,8 +361,8 @@ MathMLStream & operator<<(MathMLStream & ms, char_type c)
MathMLStream & operator<<(MathMLStream & ms, MTag const & t)
{
- ++ms.tab();
ms.cr();
+ ++ms.tab();
ms.os() << '<' << from_ascii(ms.namespacedTag(t.tag_));
if (!t.attr_.empty())
ms.os() << " " << from_ascii(t.attr_);
@@ -384,9 +384,9 @@ MathMLStream & operator<<(MathMLStream & ms, MTagInline const & t)
MathMLStream & operator<<(MathMLStream & ms, ETag const & t)
{
- ms.cr();
if (ms.tab() > 0)
--ms.tab();
+ ms.cr();
ms.os() << "</" << from_ascii(ms.namespacedTag(t.tag_)) << ">";
return ms;
}
More information about the lyx-cvs
mailing list