]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
fix some C++ parsing bugs
[lyx.git] / src / lyxlex_pimpl.C
index 653d6fe04e092d2f34600454b6224c557a9c43b5..35d843f8dfb4f6e3fd07d446ecc52e2f35a0a8fa 100644 (file)
@@ -144,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);
@@ -434,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);