From: Enrico Forestieri Date: Thu, 22 Jul 2010 23:19:52 +0000 (+0000) Subject: Fix bug #1337: LyX confused on $ symbol in math equations X-Git-Tag: 2.0.0~2904 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=976307231db4c3bfcd3736b88be99054812bdc8e;p=features.git Fix bug #1337: LyX confused on $ symbol in math equations git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35008 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/mathed/MathParser.cpp b/src/mathed/MathParser.cpp index 3a8e4c2886..8ad3173d22 100644 --- a/src/mathed/MathParser.cpp +++ b/src/mathed/MathParser.cpp @@ -1217,12 +1217,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags, } else if (t.cs() == "(") { - if (mode == InsetMath::MATH_MODE) { - error("bad math environment"); - break; - } - cell->push_back(MathAtom(new InsetMathHull(buf, hullSimple))); - parse2(cell->back(), FLAG_SIMPLE2, InsetMath::MATH_MODE, false); + cell->push_back(MathAtom(new InsetMathEnsureMath(buf))); + parse(cell->back().nucleus()->cell(0), FLAG_SIMPLE2, InsetMath::MATH_MODE); } else if (t.cs() == "[") { @@ -1494,12 +1490,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags, } else if (name == "math") { - if (mode == InsetMath::MATH_MODE) { - error("bad math environment"); - break; - } - cell->push_back(MathAtom(new InsetMathHull(buf, hullSimple))); - parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, true); + cell->push_back(MathAtom(new InsetMathEnsureMath(buf))); + parse(cell->back().nucleus()->cell(0), FLAG_END, InsetMath::MATH_MODE); } else if (name == "equation" || name == "equation*"