ret = html::cleanAttr(ret);
// make sure it is not too big
- if (ret.size() > maxsize)
- ret = ret.substr(0, maxsize - 3) + from_ascii("...");
+ support::truncateWithEllipsis(ret, maxsize);
return ret;
}
before, after, dialog, key + 1 != ken);
}
- if (ret.size() > max_size) {
- ret.resize(max_size - 3);
- ret += "...";
- } else if (too_many_keys) {
- if (ret.size() > max_size - 3)
- ret.resize(max_size - 3);
- ret += "...";
- }
+ if (too_many_keys)
+ ret.push_back(0x2026);//HORIZONTAL ELLIPSIS
+ support::truncateWithEllipsis(ret, max_size);
return ret;
}
docstring const num = convert<docstring>(++keynumber);
entry.setCiteNumber(num);
} else {
+ // coverity complains about our derefercing the iterator last,
+ // which was not initialized above. but it does get initialized
+ // after the first time through the loop, which is the point of
+ // the first test.
+ // coverity[FORWARD_NULL]
if (it != cited_entries_.begin()
&& entry.getAbbreviatedAuthor() == last->second.getAbbreviatedAuthor()
// we access the year via getYear() so as to get it from the xref,