+2002-03-11 Herbert Voss <voss@lyx.org>
+
+ * biblio.C (parseBibTeX): fix another minibug with an
+ ending comma
+
2002-03-10 Herbert Voss <voss@lyx.org>
* biblio.C (parseBibTeX): fix bug
2002-03-10 Herbert Voss <voss@lyx.org>
* biblio.C (parseBibTeX): fix bug
*
* \file biblio.C
* \author Angus Leeming <a.leeming@ic.ac.uk>
*
* \file biblio.C
* \author Angus Leeming <a.leeming@ic.ac.uk>
+ * \author Herbert Voss <voss@perce.de>
if (year.empty())
year = "50BC";
if (year.empty())
year = "50BC";
if (data.length() < 2 || data[0] != '=') { // a valid entry?
return string();
} else {
if (data.length() < 2 || data[0] != '=') { // a valid entry?
return string();
} else {
- data = frontStrip(data.substr(1, data.length() - 1));
+ // delete '=' and the following spaces
+ data = frontStrip(frontStrip(data,'='));
if (data.length() < 2) {
return data; // not long enough to find delimiters
} else {
if (data.length() < 2) {
return data; // not long enough to find delimiters
} else {
} else if (data[0] == '"') {
enclosing = '"';
} else {
} else if (data[0] == '"') {
enclosing = '"';
} else {
- return data; // no {} and no "", pure data
+ // no {} and no "", pure data but with a
+ // possible ',' at the end
+ return strip(data,',');
}
string tmp = data.substr(keypos);
while (tmp.find('{') != string::npos &&
}
string tmp = data.substr(keypos);
while (tmp.find('{') != string::npos &&