Don't allow raw newlines in options

This happens if the options are split over multiple lines in the
latex source. A newline here confuses the lexer when reading the
converted LyX file.
This commit is contained in:
Enrico Forestieri 2017-06-17 19:05:02 +02:00
parent 9f9457eb00
commit f135c8d227

View File

@ -1326,7 +1326,7 @@ void parse_listings(Parser & p, ostream & os, Context & parent_context,
{
parent_context.check_layout(os);
begin_inset(os, "listings\n");
string arg = p.hasOpt() ? p.verbatimOption() : string();
string arg = p.hasOpt() ? subst(p.verbatimOption(), "\n", "") : string();
if (use_minted) {
string const language = p.getArg('{', '}');
p.skip_spaces(true);