It is not necessarily, and infers with some usages, to generally escape
spaces in labels and references
os << fcmd;
if (use_refstyle && use_plural)
os << "[s]";
- os << '{' << label << '}';
+ if (contains(label, ' '))
+ // refstyle bug: labels with blanks need to be grouped
+ // otherwise the blanks will be gobbled
+ os << "{{" << label << "}}";
+ else
+ os << '{' << label << '}';
}
else if (cmd == "labelonly") {
docstring const & ref = getParam("reference");
for (char_type const c : lab) {
if (c >= 128 || c == '=' || c == '%' || c == '#' || c == '$'
|| c == '}' || c == '{' || c == ']' || c == '[' || c == '&'
- || c == '\\' || c == ' ') // refstyle doesn't support spaces
+ || c == '\\')
{
// Although char_type is a 32 bit type we know that
// UCS4 occupies only 21 bits, so we don't need to