Fix up logic of BibTeXInfo::getInfo. We don't need to process the

richtext stuff unless we actually need it.
This commit is contained in:
Richard Heck 2014-05-23 10:48:22 -04:00
parent b178770ce3
commit 344ea62dd0

View File

@ -624,12 +624,17 @@ docstring const & BibTeXInfo::getInfo(BibTeXInfo const * const xref,
info_ = expandFormat(format, xref, counter, buf,
docstring(), docstring(), docstring(), false);
if (!info_.empty()) {
info_richtext_ = convertLaTeXCommands(processRichtext(info_, true));
info_ = convertLaTeXCommands(processRichtext(info_, false));
if (richtext)
return info_richtext_;
if (info_.empty()) {
// this probably shouldn't happen
return info_;
}
if (richtext) {
info_richtext_ = convertLaTeXCommands(processRichtext(info_, true));
return info_richtext_;
}
info_ = convertLaTeXCommands(processRichtext(info_, false));
return info_;
}