]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
next step...
[lyx.git] / src / lyxlex_pimpl.C
index b385ef8d53e8c7f3d4e86d5dc84afc74ec7336a7..cb574e9e7dd45542fc38d73aff4b0a3aeacd53b7 100644 (file)
@@ -40,7 +40,7 @@ LyXLex::Pimpl::Pimpl(keyword_item * tab, int num)
 }
 
 
-string const LyXLex::Pimpl::GetString() const
+string const LyXLex::Pimpl::getString() const
 {
        return string(buff);
 }
@@ -48,7 +48,7 @@ string const LyXLex::Pimpl::GetString() const
 
 void LyXLex::Pimpl::printError(string const & message) const
 {
-       string const tmpmsg = subst(message, "$$Token", GetString());
+       string const tmpmsg = subst(message, "$$Token", getString());
        lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
               << " of file " << MakeDisplayPath(name) << ']' << endl;
 }
@@ -311,7 +311,10 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                                // escape the next char
                                                is.get(cc);
                                                c = cc;
-                                               escaped = true;
+                                               if (c == '\"' || c == '\\')
+                                                       escaped = true;
+                                               else
+                                                       buff[++i] = '\\';
                                        }
                                        buff[++i] = c;
                                        
@@ -393,7 +396,7 @@ int LyXLex::Pimpl::lex()
 }
 
        
-bool LyXLex::Pimpl::EatLine()
+bool LyXLex::Pimpl::eatLine()
 {
        int i = 0;
        unsigned char c = '\0';