Skip to content

Commit a13ab60

Browse files
committed
Revert "Merge pull request #7 from katrinleinweber/support-preferred-resolver"
This reverts commit 7e64e2d, reversing changes made to 5e4299a.
1 parent 3fbbcf9 commit a13ab60

File tree

4 files changed

+6
-11
lines changed

4 files changed

+6
-11
lines changed

cli-index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (argv.h) {
2020
'Options: \n' +
2121
'-e, --exact Find an exact match \n' +
2222
'-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' +
2424
'-m, --match Find all matches within the given string\n' +
2525
'-g, --groups Find matches with groupings for extra suffixes')
2626
process.exit(-1)

coverage/lcov-report/doi-regex/index.js.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ <h2>
197197
&nbsp;
198198
doi.resolvePath = function (opts) {
199199
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 + '$')
202202
}
203203
&nbsp;</pre></td></tr>
204204
</table></pre>

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ doi.declared = function (opts) {
5050

5151
doi.resolvePath = function (opts) {
5252
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 + '$')
5555
}

spec/test.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ var doiDeclared = [
2424

2525
var doiResolvePathWithoutProtocol = [
2626
'dx.doi.org/10.1016/j.neuron.2014.09.004'
27-
'doi.org/10.1016/j.neuron.2014.09.004'
2827
]
2928

3029
var doiResolvePathWithProtocol = [
3130
'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'
3532
]
3633

3734
var doiResolvePathInvalid = [
@@ -40,9 +37,7 @@ var doiResolvePathInvalid = [
4037

4138
var doiResolvePathWithProtocolInvalid = [
4239
'httpp://dx.doi.org/10.1016/j.neuron.2014.09.004',
43-
'httpp://doi.org/10.1016/j.neuron.2014.09.004',
4440
'ftp://dx.doi.org/10.1016/j.neuron.2014.09.004',
45-
'ftp://doi.org/10.1016/j.neuron.2014.09.004',
4641
]
4742

4843
var doiNotDeclared = [

0 commit comments

Comments
 (0)