From: Georg Baum Date: Sat, 3 Jan 2015 16:59:20 +0000 (+0100) Subject: Skip missing optional argument insets in tex2lyx X-Git-Tag: 2.1.3~37 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=88cdd6dc6056c94c5989ad8072cc34ad7c819ebd;p=features.git Skip missing optional argument insets in tex2lyx 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). --- diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index aecc6fbd0a..0f3aae76a1 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -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";