]> git.lyx.org Git - features.git/commitdiff
Skip missing optional argument insets in tex2lyx
authorGeorg Baum <baum@lyx.org>
Mon, 29 Dec 2014 20:54:15 +0000 (21:54 +0100)
committerGeorg Baum <baum@lyx.org>
Mon, 29 Dec 2014 20:54:15 +0000 (21:54 +0100)
Optional arguments are optional, so if one is missing, do not stop the parsing,
but continue with the next argument (it might be a required one).

src/tex2lyx/text.cpp

index 8f136647c5d2dc18b1a49b76ec9dfe83be58625b..7bb0a3fe309a401c4ff6b1b1d9f392f6e0a109a0 100644 (file)
@@ -644,7 +644,7 @@ void output_arguments(ostream & os, Parser & p, bool outer, Context & context,
                } else {
                        if (p.next_token().cat() == catEscape ||
                            p.next_token().character() != '[')
-                               break;
+                               continue;
                        p.get_token(); // eat '['
                        begin_inset(os, "Argument ");
                        os << i << "\nstatus collapsed\n\n";