From 1535e4b825fe01e8a7aaba708f3c321edc132a22 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Fri, 23 Oct 2009 15:00:36 +0000 Subject: [PATCH] Fix the rest of bug #6284. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31694 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathStream.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mathed/MathStream.cpp b/src/mathed/MathStream.cpp index bfba25e463..c0325a97a8 100644 --- a/src/mathed/MathStream.cpp +++ b/src/mathed/MathStream.cpp @@ -93,6 +93,8 @@ WriteStream & operator<<(WriteStream & ws, docstring const & s) } else if (ws.pendingSpace() && s.length() > 0) { if (isAlphaASCII(s[0])) ws.os() << ' '; + else if (s[0] == ' ' && ws.textMode()) + ws.os() << '\\'; ws.pendingSpace(false); } ws.os() << s; @@ -185,6 +187,8 @@ WriteStream & operator<<(WriteStream & ws, char const * s) } else if (ws.pendingSpace() && strlen(s) > 0) { if (isAlphaASCII(s[0])) ws.os() << ' '; + else if (s[0] == ' ' && ws.textMode()) + ws.os() << '\\'; ws.pendingSpace(false); } ws.os() << s; @@ -203,6 +207,8 @@ WriteStream & operator<<(WriteStream & ws, char c) } else if (ws.pendingSpace()) { if (isAlphaASCII(c)) ws.os() << ' '; + else if (c == ' ' && ws.textMode()) + ws.os() << '\\'; ws.pendingSpace(false); } ws.os() << c; -- 2.39.5