From: André Pönitz Date: Mon, 5 Aug 2002 10:27:40 +0000 (+0000) Subject: re-try to suppress "extra" {} on reading... X-Git-Tag: 1.6.10~18681 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b181cd29a9995467e09e270977c1ddccc3195ee2;p=features.git re-try to suppress "extra" {} on reading... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4860 a592a061-630c-0410-9148-cb99ea01b6c8 --- 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)) {