]> git.lyx.org Git - features.git/commitdiff
Skip missing optional argument insets in tex2lyx
authorGeorg Baum <baum@lyx.org>
Sat, 3 Jan 2015 16:59:20 +0000 (17:59 +0100)
committerGeorg Baum <baum@lyx.org>
Sat, 3 Jan 2015 16:59:20 +0000 (17:59 +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 aecc6fbd0aa65fd76545d24d2cebffd890d3e8f2..0f3aae76a1319aaa6f3708b09789e82f6c73f521 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";