fix writing of some spaces.

Sorry for not discussing this on the list, this has the potential of
corrupting files...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5425 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-10-16 15:32:34 +00:00
parent 8644c32d38
commit 8f6a9ee292
2 changed files with 6 additions and 6 deletions

View File

@ -72,6 +72,11 @@ WriteStream & operator<<(WriteStream & ws, MathArray const & ar)
WriteStream & operator<<(WriteStream & ws, char const * s) WriteStream & operator<<(WriteStream & ws, char const * s)
{ {
if (ws.pendingSpace() && strlen(s) > 0) {
if (isAlpha(s[0]))
ws.os() << ' ';
ws.pendingSpace(false);
}
ws.os() << s; ws.os() << s;
ws.addlines(int(lyx::count(s, s + strlen(s), '\n'))); ws.addlines(int(lyx::count(s, s + strlen(s), '\n')));
return ws; return ws;

View File

@ -13,12 +13,7 @@
WriteStream & operator<<(WriteStream & ws, string const & s) WriteStream & operator<<(WriteStream & ws, string const & s)
{ {
if (ws.pendingSpace()) { ws << s.c_str();
ws.os() << ' ';
ws.pendingSpace(false);
}
ws.os() << s;
ws.addlines(int(lyx::count(s.begin(), s.end(), '\n')));
return ws; return ws;
} }