mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Don't call parseBibTeX at all if the info field is from lyx layout
"bibliography" (from Herbert). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3671 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1dbd25f40a
commit
8bfda1f950
@ -1,3 +1,7 @@
|
||||
2002-03-05 Herbert Voss <voss@lyx.org>
|
||||
|
||||
biblio.C: (getInfo) simplify if using paragraph layout "bibliography".
|
||||
|
||||
2002-03-05 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* biblio.C (getInfo): return the info field correctly if the key
|
||||
|
@ -242,7 +242,11 @@ string const getInfo(InfoMap const & map, string const & key)
|
||||
lyx::Assert(!map.empty());
|
||||
|
||||
InfoMap::const_iterator it = map.find(key);
|
||||
if (it == map.end()) return string();
|
||||
if (it == map.end())
|
||||
return string();
|
||||
// is the entry a BibTeX one or one from lyx-layout "bibliography"?
|
||||
if (!contains(it->second,'='))
|
||||
return it->second.c_str();
|
||||
|
||||
// Search for all possible "required" keys
|
||||
string author = parseBibTeX(it->second, "author");
|
||||
@ -287,7 +291,9 @@ string const getInfo(InfoMap const & map, string const & key)
|
||||
|
||||
char const * const tmp = result.str().c_str();
|
||||
string result_str = tmp ? strip(tmp) : string();
|
||||
if (result_str.empty()) // not a BibTeX record
|
||||
|
||||
if (result_str.empty())
|
||||
// This should never happen (or at least be very unusual!)
|
||||
result_str = it->second;
|
||||
|
||||
return result_str;
|
||||
|
Loading…
Reference in New Issue
Block a user