re-try to suppress "extra" {} on reading...

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4860 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-08-05 10:27:40 +00:00
parent 200b4fd4ef
commit b181cd29a9
2 changed files with 9 additions and 1 deletions

View File

@ -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;
}
}

View File

@ -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)) {