mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
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:
parent
8644c32d38
commit
8f6a9ee292
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user