]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
fix some C++ parsing bugs
[lyx.git] / src / lyxlex_pimpl.C
index 4bca54ed3101a1d0960b63a6eefd03576333f7f8..35d843f8dfb4f6e3fd07d446ecc52e2f35a0a8fa 100644 (file)
@@ -1,15 +1,13 @@
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-#include <algorithm>
-
 #include "lyxlex_pimpl.h"
+#include "debug.h"
+
 #include "support/lyxalgo.h"
 #include "support/filetools.h"
 #include "support/lstrings.h"
-#include "debug.h"
+
+#include <algorithm>
 
 using std::sort;
 using std::ostream;
@@ -146,7 +144,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                // There can have been a whole line pushed so
                // we extract the first word and leaves the rest
                // in pushTok. (Lgb)
-               if (pushTok.find(' ') != string::npos) {
+               if (pushTok.find(' ') != string::npos && pushTok[0] == '\\') {
                        string tmp;
                        pushTok = split(pushTok, tmp, ' ');
                        tmp.copy(buff, string::npos);
@@ -436,7 +434,7 @@ bool LyXLex::Pimpl::nextToken()
                // There can have been a whole line pushed so
                // we extract the first word and leaves the rest
                // in pushTok. (Lgb)
-               if (pushTok.find(' ') != string::npos) {
+               if (pushTok.find(' ') != string::npos && pushTok[0] == '\\') {
                        string tmp;
                        pushTok = split(pushTok, tmp, ' ');
                        tmp.copy(buff, string::npos);