From: Thomas Fischer Date: Mon, 6 Feb 2012 21:57:41 +0000 (+0000) Subject: Fix data loss with doi field X-Git-Tag: archive/raspbian/0.9.90-1+rpi1~1^2^2^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=25920a056d7533395e7abf0976d6b455309518c8;p=kbibtex.git Fix data loss with doi field This simple extract of a bibtex file is corrupted by bibtex @article{JPAMG06MU, author = "D. V. Makarov and M. Yu. Uleysky", doi = "10.1088/0305-4470/39/3/003", issn = "0305-4470", issue = "3", journal = "Journal of Physics A: Mathematical and General", pages = "489–497", title = "Specific Poincaré map for a randomly-perturbed nonlinear oscillator", volume = "39", year = "2006" } If you open this file with KBibTex, doi is always cutted to 10.1088/0305-4470 and external link, of course, don't work. Also, KBibTex cutting this doi then saving file. This is a data loss from original bibtex file. bug-debian: http://bugs.debian.org/694782 Forwarded: http://gna.org/bugs/?19394 applied-upstream: 4.1 git-svn-id: http://svn.gna.org/svn/kbibtex/trunk@1120 a95f91f9-4086-4c1d-b66f-92a7d89649f5 Gbp-Pq: Name 0006-Fix-data-loss-with-doi-fiel.patch --- diff --git a/src/kbibtexnamespace.h b/src/kbibtexnamespace.h index 700e7d9..16dd8bd 100644 --- a/src/kbibtexnamespace.h +++ b/src/kbibtexnamespace.h @@ -65,7 +65,7 @@ static const QString MonthsTriple[] = { static const QRegExp fileListSeparatorRegExp("[ \\t]*[;\\n][ \\t]*"); static const QRegExp fileRegExp("(\\bfile:)?[^{}\\t]+\\.\\w{2,4}\\b", Qt::CaseInsensitive); static const QRegExp urlRegExp("\\b(http|s?ftp|webdav|file)s?://[^ {}\"]+\\b", Qt::CaseInsensitive); -static const QRegExp doiRegExp("\\b10\\.\\d{4}/[-a-z0-9.()_:\\\\]+", Qt::CaseInsensitive); +static const QRegExp doiRegExp("\\b10\\.\\d{4}/[/-a-z0-9.()_:\\\\]+", Qt::CaseInsensitive); static const QString doiUrlPrefix = QLatin1String("http://dx.doi.org/"); static const QRegExp domainNameRegExp("[a-z0-9.-]+\\.((a[cdefgilmnoqrstuwxz]|aero|arpa)|(b[abdefghijmnorstvwyz]|biz)|(c[acdfghiklmnorsuvxyz]|cat|com|coop)|d[ejkmoz]|(e[ceghrstu]|edu)|f[ijkmor]|(g[abdefghilmnpqrstuwy]|gov)|h[kmnrtu]|(i[delmnoqrst]|info|int)|(j[emop]|jobs)|k[eghimnprwyz]|l[abcikrstuvy]|(m[acdghklmnopqrstuvwxyz]|me|mil|mobi|museum)|(n[acefgilopruz]|name|net)|(om|org)|(p[aefghklmnrstwy]|pro)|qa|r[eouw]|s[abcdeghijklmnortvyz]|(t[cdfghjklmnoprtvwz]|travel)|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw])", Qt::CaseInsensitive);