diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 5832bc7368..7bb4069533 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -1,3 +1,8 @@ +2005-03-02 Georg Baum + + * math_parser.C (parse1): Don't parse "\|" following a "\left" or + "\right" as "|" + 2005-02-28 André Pönitz * math_nestinset.C (lfunMouseRelease, lfunMouseMotion, lfunMousePress): diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 192e642b8f..6855483c55 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -1048,11 +1048,16 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, else if (t.cs() == "left") { skipSpaces(); - string l = getToken().asString(); + Token const & tl = getToken(); + // \| and \Vert are equivalent, and MathDelimInset + // can't handle \| + // FIXME: fix this in MathDelimInset itself! + string const l = tl.cs() == "|" ? "Vert" : tl.asString(); MathArray ar; parse(ar, FLAG_RIGHT, mode); skipSpaces(); - string r = getToken().asString(); + Token const & tr = getToken(); + string const r = tr.cs() == "|" ? "Vert" : tr.asString(); cell->push_back(MathAtom(new MathDelimInset(l, r, ar))); } @@ -1083,8 +1088,8 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, } else if (name == "split" || name == "cases" || - name == "gathered" || name == "aligned" || - name == "alignedat") { + name == "gathered" || name == "aligned" || + name == "alignedat") { cell->push_back(createMathInset(name)); parse2(cell->back(), FLAG_END, mode, false); }