File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,6 @@ doi.declared = function (opts) {
50
50
51
51
doi . resolvePath = function ( opts ) {
52
52
opts = opts || { }
53
- return opts . protocol ? new RegExp ( '^http(s)?\\://dx\\.doi\\.org/' + doiRegex + '$' ) :
54
- new RegExp ( '^(http(s)?\\://)?dx\\.doi\\.org/' + doiRegex + '$' )
53
+ return opts . protocol ? new RegExp ( '^http(s)?\\://( dx\\.)? doi\\.org/' + doiRegex + '$' ) :
54
+ new RegExp ( '^(http(s)?\\://)?( dx\\.)? doi\\.org/' + doiRegex + '$' )
55
55
}
Original file line number Diff line number Diff line change @@ -23,12 +23,15 @@ var doiDeclared = [
23
23
]
24
24
25
25
var doiResolvePathWithoutProtocol = [
26
- 'dx.doi.org/10.1016/j.neuron.2014.09.004'
26
+ 'dx.doi.org/10.1016/j.neuron.2014.09.004' ,
27
+ 'doi.org/10.1016/j.neuron.2014.09.004'
27
28
]
28
29
29
30
var doiResolvePathWithProtocol = [
30
31
'http://dx.doi.org/10.1016/j.neuron.2014.09.004' ,
31
- 'https://dx.doi.org/10.1016/j.neuron.2014.09.004'
32
+ 'https://dx.doi.org/10.1016/j.neuron.2014.09.004' ,
33
+ 'http://doi.org/10.1016/j.neuron.2014.09.004' ,
34
+ 'https://doi.org/10.1016/j.neuron.2014.09.004'
32
35
]
33
36
34
37
var doiResolvePathInvalid = [
@@ -37,7 +40,9 @@ var doiResolvePathInvalid = [
37
40
38
41
var doiResolvePathWithProtocolInvalid = [
39
42
'httpp://dx.doi.org/10.1016/j.neuron.2014.09.004' ,
43
+ 'httpp://doi.org/10.1016/j.neuron.2014.09.004' ,
40
44
'ftp://dx.doi.org/10.1016/j.neuron.2014.09.004' ,
45
+ 'ftp://doi.org/10.1016/j.neuron.2014.09.004' ,
41
46
]
42
47
43
48
var doiNotDeclared = [
You can’t perform that action at this time.
0 commit comments