From b181cd29a9995467e09e270977c1ddccc3195ee2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 5 Aug 2002 10:27:40 +0000 Subject: [PATCH] re-try to suppress "extra" {} on reading... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4860 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_extern.C | 5 ++++- src/mathed/math_parser.C | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mathed/math_extern.C b/src/mathed/math_extern.C index 053c90bfc3..c277617e50 100644 --- a/src/mathed/math_extern.C +++ b/src/mathed/math_extern.C @@ -834,8 +834,11 @@ void write(MathArray const & dat, WriteStream & wi) { MathArray ar = dat; extractStrings(ar); - for (MathArray::const_iterator it = ar.begin(); it != ar.end(); ++it) + wi.firstitem() = true; + for (MathArray::const_iterator it = ar.begin(); it != ar.end(); ++it) { (*it)->write(wi); + wi.firstitem() = false; + } } diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 942558f150..10438255ac 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -665,6 +665,11 @@ void Parser::parse1(MathGridInset & grid, unsigned flags, parse(p->cell(up), FLAG_ITEM, mathmode); p->limits(limits); limits = 0; + // special handling of {}-bases + // is this always correct? + if (p->nuc().size() == 1 && p->nuc().back()->asNestInset() && + p->nuc().back()->extraBraces()) + p->nuc() = p->nuc().back()->asNestInset()->cell(0); } else if (t.character() == ']' && (flags & FLAG_BRACK_LAST)) { -- 2.39.2