diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index e5180cffe6..2e7f08a596 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -1327,6 +1327,11 @@ void parse_listings(Parser & p, ostream & os, Context & parent_context, parent_context.check_layout(os); begin_inset(os, "listings\n"); string arg = p.hasOpt() ? subst(p.verbatimOption(), "\n", "") : string(); + size_t i; + while ((i = arg.find(", ")) != string::npos + || (i = arg.find(",\t")) != string::npos) + arg.erase(i + 1, 1); + if (use_minted) { string const language = p.getArg('{', '}'); p.skip_spaces(true);