]> git.lyx.org Git - features.git/commitdiff
Fix parser glitch as reported by J.L.M.Assirati
authorAndré Pönitz <poenitz@gmx.net>
Thu, 7 Mar 2002 17:34:51 +0000 (17:34 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 7 Mar 2002 17:34:51 +0000 (17:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3696 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_parser.C

index b59643b9817e77d4d4c1238a021ec87dd141fbd9..274e29ae386cd7bcbc7381d44f8a6f54ac22605d 100644 (file)
@@ -914,16 +914,19 @@ void Parser::parse_into1(MathArray & array, unsigned flags, MathTextCodes code)
 #endif
 
                if (flags & FLAG_ITEM) {
+                       if (t.cat() == catSpace)
+                               continue;
+
                        flags &= ~FLAG_ITEM;
                        if (t.cat() == catBegin) { 
                                // skip the brace and collect everything to the next matching
                                // closing brace
                                flags |= FLAG_BRACE_LAST;
                                continue;
-                       } else {
-                               // handle only this single token, leave the loop if done
-                               flags |= FLAG_LEAVE;
                        }
+
+                       // handle only this single token, leave the loop if done
+                       flags |= FLAG_LEAVE;
                }
 
                if (flags & FLAG_BLOCK) {