File tree Expand file tree Collapse file tree 4 files changed +6
-11
lines changed
coverage/lcov-report/doi-regex Expand file tree Collapse file tree 4 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ if (argv.h) {
20
20
'Options: \n' +
21
21
'-e, --exact Find an exact match \n' +
22
22
'-d, --declared Find a DOI with a `doi:` prefix\n' +
23
- '-r, --resolvePath Find a DOI with a `https://doi.org` or `https:// dx.doi.org` prefix\n' +
23
+ '-r, --resolvePath Find a DOI with a `https://dx.doi.org` prefix\n' +
24
24
'-m, --match Find all matches within the given string\n' +
25
25
'-g, --groups Find matches with groupings for extra suffixes' )
26
26
process . exit ( - 1 )
Original file line number Diff line number Diff line change 197
197
198
198
doi.resolvePath = function (opts) {
199
199
opts = opts || {}
200
- return opts.protocol ? new RegExp('^http(s)?\\://( dx\\.)? doi\\.org/' + doiRegex + '$') :
201
- new RegExp('^(http(s)?\\://)?( dx\\.)? doi\\.org/' + doiRegex + '$')
200
+ return opts.protocol ? new RegExp('^http(s)?\\://dx\\.doi\\.org/' + doiRegex + '$') :
201
+ new RegExp('^(http(s)?\\://)?dx\\.doi\\.org/' + doiRegex + '$')
202
202
}
203
203
</ pre > </ td > </ tr >
204
204
</ table > </ pre >
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 @@ -24,14 +24,11 @@ var doiDeclared = [
24
24
25
25
var doiResolvePathWithoutProtocol = [
26
26
'dx.doi.org/10.1016/j.neuron.2014.09.004'
27
- 'doi.org/10.1016/j.neuron.2014.09.004'
28
27
]
29
28
30
29
var doiResolvePathWithProtocol = [
31
30
'http://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'
31
+ 'https://dx.doi.org/10.1016/j.neuron.2014.09.004'
35
32
]
36
33
37
34
var doiResolvePathInvalid = [
@@ -40,9 +37,7 @@ var doiResolvePathInvalid = [
40
37
41
38
var doiResolvePathWithProtocolInvalid = [
42
39
'httpp://dx.doi.org/10.1016/j.neuron.2014.09.004' ,
43
- 'httpp://doi.org/10.1016/j.neuron.2014.09.004' ,
44
40
'ftp://dx.doi.org/10.1016/j.neuron.2014.09.004' ,
45
- 'ftp://doi.org/10.1016/j.neuron.2014.09.004' ,
46
41
]
47
42
48
43
var doiNotDeclared = [
You can’t perform that action at this time.
0 commit comments