From: Enrico Forestieri Date: Tue, 5 Feb 2019 18:04:12 +0000 (+0100) Subject: Use braces for listings caption X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b622d2de8c11f301260fe56f3288ba4c94964700;p=features.git Use braces for listings caption Commit [3366c49f/lyxgit] intended to strip braces only for minted but was actually stripping them also for listings. As the braces are necessary for the listings package, reintroduce them. This is a master-only issue. --- diff --git a/src/insets/InsetInclude.cpp b/src/insets/InsetInclude.cpp index 121b1ad8a9..dba295636c 100644 --- a/src/insets/InsetInclude.cpp +++ b/src/insets/InsetInclude.cpp @@ -666,7 +666,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const ParamInfo::HANDLING_LATEXIFY); opts.erase(opts.begin() + i--); if (!use_minted) - latexed_opts.push_back(from_ascii("caption=") + caption); + latexed_opts.push_back(from_ascii("caption={") + caption + "}"); } else if (prefixIs(opts[i], from_ascii("label="))) { label = params().prepareCommand(runparams, trim(opts[i].substr(6), "{}"), ParamInfo::HANDLING_ESCAPE);