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
This commit is contained in:
Enrico Forestieri 2010-07-22 23:19:52 +00:00
parent 69496fb214
commit 976307231d

View File

@ -1217,12 +1217,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
} }
else if (t.cs() == "(") { else if (t.cs() == "(") {
if (mode == InsetMath::MATH_MODE) { cell->push_back(MathAtom(new InsetMathEnsureMath(buf)));
error("bad math environment"); parse(cell->back().nucleus()->cell(0), FLAG_SIMPLE2, InsetMath::MATH_MODE);
break;
}
cell->push_back(MathAtom(new InsetMathHull(buf, hullSimple)));
parse2(cell->back(), FLAG_SIMPLE2, InsetMath::MATH_MODE, false);
} }
else if (t.cs() == "[") { else if (t.cs() == "[") {
@ -1494,12 +1490,8 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
} }
else if (name == "math") { else if (name == "math") {
if (mode == InsetMath::MATH_MODE) { cell->push_back(MathAtom(new InsetMathEnsureMath(buf)));
error("bad math environment"); parse(cell->back().nucleus()->cell(0), FLAG_END, InsetMath::MATH_MODE);
break;
}
cell->push_back(MathAtom(new InsetMathHull(buf, hullSimple)));
parse2(cell->back(), FLAG_END, InsetMath::MATH_MODE, true);
} }
else if (name == "equation" || name == "equation*" else if (name == "equation" || name == "equation*"