Hello.

On Wed, 20 Feb 2002, Joao Luis Meloni Assirati wrote:

> \begin_inset Formula \[
> \frac{3} {2}\]
> \end_inset 
> 
> \begin_inset Formula \[
> \frac{3}
> {2}\]
> \end_inset 
> 
> are not parsed correctly. The space or the newline between the two
> arguments of \frac should have no effect, but they get parsed as
> 
> \begin_inset Formula \[
> \frac{3}{}{2}\]
> \end_inset 


This tiny patch fixes the problem.

--- cvs/lyx-devel/src/mathed/math_parser.C      Sun Feb 17 19:48:14 2002
+++ work/lyx/src/mathed/math_parser.C   Wed Feb 20 23:06:12 2002
@@ -890,6 +890,7 @@ bool Parser::parse_normal(MathAtom & mat

 void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
 {
+       skipSpaces();
        parse_into1(array, flags, code);
        // remove 'unnecessary' braces:
        if (array.size() == 1 && array.back()->asBraceInset()) {


Regards,

Joćo.
--- cvs/lyx-devel/src/mathed/math_parser.C      Sun Feb 17 19:48:14 2002
+++ work/lyx/src/mathed/math_parser.C   Wed Feb 20 23:06:12 2002
@@ -890,6 +890,7 @@ bool Parser::parse_normal(MathAtom & mat
 
 void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
 {
+       skipSpaces();
        parse_into1(array, flags, code);
        // remove 'unnecessary' braces:
        if (array.size() == 1 && array.back()->asBraceInset()) {

Reply via email to