]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathParser.cpp
Add \makeat switches to babel settings if necessary.
[lyx.git] / src / mathed / MathParser.cpp
index b3f1bca76b64cabbfcb33b9f8d879503bc15aca3..9752320095312a75ff1b857d007ee0e679b50c27 100644 (file)
@@ -536,7 +536,6 @@ char_type Parser::getChar()
 {
        if (!good()) {
                error("The input stream is not well...");
-               putback();
                return 0;
        }
        return tokens_[pos_++].character();
@@ -545,9 +544,12 @@ char_type Parser::getChar()
 
 docstring Parser::getArg(char_type left, char_type right)
 {
+       docstring result;
        skipSpaces();
 
-       docstring result;
+       if (!good())
+               return result;
+
        char_type c = getChar();
 
        if (c != left)
@@ -1016,7 +1018,7 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
                                Token const & t = getToken();
                                if (t.cat() == catNewline)
                                        break;
-                               s += t.asString();
+                               s += t.asInput();
                        }
                        cell->push_back(MathAtom(new InsetMathComment(buf, s)));
                        skipSpaces();