Don't enclose in braces minted languages

This is because the braces would be part of the language name.
This commit is contained in:
Enrico Forestieri 2017-06-27 00:58:07 +02:00
parent 7b5d33a707
commit 0e90aeea90

View File

@ -1050,7 +1050,8 @@ void InsetListingsParams::addParam(string const & key,
if (key.empty())
return;
string const value = (minted() && key == "language" && !val.empty())
bool const is_minted_language = minted() && key == "language";
string const value = (is_minted_language && !val.empty())
? languageonly(val) : val;
// duplicate parameters!
string keyname = key;
@ -1076,7 +1077,7 @@ void InsetListingsParams::addParam(string const & key,
has_special_char = true;
break;
}
if (has_special_char)
if (has_special_char && !is_minted_language)
params_.push_back(make_pair(keyname, "{" + value + "}"));
else
params_.push_back(make_pair(keyname, value));