return;
}
+ const_cast<Buffer*>(buf)->tocBackend().update();
+
// Add an entry for the master doc if this is a child doc
Buffer const * const master = buf->getMasterBuffer();
if (buf != master) {
if (!caption.empty()) {
Toc & toc = toclist["listing"];
docstring const str = convert<docstring>(toc.size() + 1)
- + ". " + params_["filename"];
+ + ". " + from_utf8(caption);
// This inset does not have a valid ParConstIterator
// so it has to use the iterator of its parent paragraph
toc.push_back(TocItem(pit, 0, str));
{
// is this parameter defined?
map<string, string>::const_iterator it = params_.find(param);
- return (it == params_.end()) ? string() : it->second;
+ string par = (it == params_.end()) ? string() : it->second;
+ if (prefixIs(par, "{") && suffixIs(par, "}"))
+ return par.substr(1, par.size() - 2);
+ else
+ return par;
}