return true;
}
-}
+} // namespace
string translate_len(string const & length)
{
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();
+ 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);
} else {
// We already got the caption at the bottom,
// so simply skip it.
- p.getArg('{', '}');
+ parse_text_snippet(p, FLAG_ITEM, false, context);
}
}