Juergen Spitzmueller wrote: > One small, unimportant and strictly cosmetic issue is left. > Pybliographer doesn't write the year entry as: > > year = {2002}, > > but > > year = 2002, > > Therefor, the parser interprets the year with the comma, so the choice > displays "Voss (2002,)". If it is easy to strip this comma, it'd be > cool, otherwise I can live with it.
attached a "mini"-patch Herbert -- http://www.lyx.org/help/
Index: src/frontends/controllers/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v retrieving revision 1.145 diff -u -r1.145 ChangeLog --- src/frontends/controllers/ChangeLog 2002/03/11 11:17:49 1.145 +++ src/frontends/controllers/ChangeLog 2002/03/11 14:30:54 @@ -1,3 +1,8 @@ +2002-03-11 Herbert Voss <[EMAIL PROTECTED]> + + * biblio.C (parseBibTeX): fix another minibug with an + ending comma + 2002-03-10 Herbert Voss <[EMAIL PROTECTED]> * biblio.C (parseBibTeX): fix bug Index: src/frontends/controllers/biblio.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/biblio.C,v retrieving revision 1.18 diff -u -r1.18 biblio.C --- src/frontends/controllers/biblio.C 2002/03/11 11:17:49 1.18 +++ src/frontends/controllers/biblio.C 2002/03/11 14:30:54 @@ -9,6 +9,7 @@ * * \file biblio.C * \author Angus Leeming <[EMAIL PROTECTED]> + * \author Herbert Voss <[EMAIL PROTECTED]> */ #include <config.h> @@ -212,7 +213,7 @@ if (year.empty()) year = "50BC"; - + return year; } @@ -394,7 +395,8 @@ 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 { @@ -405,7 +407,9 @@ } 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 &&