return docstring();
docstring authors;
- split(opt, authors, '(');
+ docstring const remainder = trim(split(opt, authors, '('));
+ if (remainder.empty())
+ // in this case, we didn't find a "(",
+ // so we don't have author (year)
+ return docstring();
return authors;
}
return docstring();
docstring authors;
- docstring const tmp = split(opt, authors, '(');
+ docstring tmp = split(opt, authors, '(');
+ if (tmp.empty())
+ // we don't have author (year)
+ return docstring();
docstring year;
- split(tmp, year, ')');
+ tmp = split(tmp, year, ')');
return year;
}
}
+bool BiblioInfo::isBibtex(docstring const & key) const
+{
+ BiblioInfo::const_iterator it = find(key);
+ if (it == end())
+ return false;
+ return it->second.isBibTeX();
+}
+
+
+
vector<docstring> const BiblioInfo::getCiteStrings(
docstring const & key, Buffer const & buf) const
{