Opened 7 years ago

Closed 6 years ago

#1539 closed defect (fixed)

Highwire-2.0 translator does not handle empty N1 tags appropriately

Reported by: karnesky Owned by: ajlyon
Priority: minor Milestone:
Component: translators Version: 1.0
Keywords: Cc:

Description (last modified by karnesky)

Some highwire journals emit an empty N1 field for articles that lack a DOI, see http://forums.zotero.org/discussion/8259/ensuring-dois-and-dois/

Modify the regex on line 100 and/or 101 to look for a valid doi:
https://www.zotero.org/trac/browser/extension/trunk/translators/Highwire%202.0.js?rev=4589#L100

I haven't tried this, but something like this should work:

if (text.match(/N1\s+-\s+10\.\d+\/.+\n/)) {

var doi = text.match(/N1\s+-\s+(10\.\d+\/.+)\n/)[1];

Change History (4)

comment:1 Changed 7 years ago by karnesky

  • Description modified (diff)

comment:2 Changed 6 years ago by ajlyon

  • Owner changed from mcburton to ajlyon
  • Status changed from new to assigned

This patch seems to address the problem. I've applied a version of it and posted the updated translator: http://github.com/ajlyon/zotero-bits/raw/master/Highwire%202.0.js

comment:3 Changed 6 years ago by karnesky

Since posting this, I had implemented the proposed patch & it seems to work for me too.

comment:4 Changed 6 years ago by ajlyon

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [6128]) Closes #1539, empty N1 entries cause bad data in DOI for Highwire 2.0

Note: See TracTickets for help on using tickets.