Fix data loss with doi field
authorThomas Fischer <fischer@a95f91f9-4086-4c1d-b66f-92a7d89649f5>
Mon, 6 Feb 2012 21:57:41 +0000 (21:57 +0000)
committerBastien Roucariès <roucaries.bastien+debian@gmail.com>
Tue, 4 Dec 2012 12:32:20 +0000 (12:32 +0000)
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

src/kbibtexnamespace.h

index 700e7d97e1d23cdddcfb4bdb85bf118cbab9a786..16dd8bdbb1b4fe66603855022df24da99d35238a 100644 (file)
@@ -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);