]> git.lyx.org Git - features.git/commitdiff
re-try to suppress "extra" {} on reading...
authorAndré Pönitz <poenitz@gmx.net>
Mon, 5 Aug 2002 10:27:40 +0000 (10:27 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Mon, 5 Aug 2002 10:27:40 +0000 (10:27 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4860 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_extern.C
src/mathed/math_parser.C

index 053c90bfc3dff682444b10f5cafb6ba88ed9af63..c277617e50d5a599bbcf5ab8008b5bf4c6287801 100644 (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;
+       }
 }
 
 
index 942558f1506af0f856094f972367aa39404cffef..10438255acf2086bab29b2b81048613b893f8c9c 100644 (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)) {