bare-url 0.3.7 → 0.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/parse.js +4 -4
- package/package.json +1 -1
package/lib/parse.js
CHANGED
|
@@ -119,7 +119,7 @@ module.exports = function parse (
|
|
|
119
119
|
pointer--
|
|
120
120
|
} else {
|
|
121
121
|
state = constants.STATE_FILE
|
|
122
|
-
pointer
|
|
122
|
+
pointer--
|
|
123
123
|
}
|
|
124
124
|
break
|
|
125
125
|
|
|
@@ -441,16 +441,16 @@ module.exports = function parse (
|
|
|
441
441
|
if (isDoubleDotPathSegment(buffer)) {
|
|
442
442
|
shortenPath(url)
|
|
443
443
|
|
|
444
|
-
if (c !== 0x2f && !isSpecial(url) && c === 0x5c) {
|
|
444
|
+
if (c !== 0x2f && !(isSpecial(url) && c === 0x5c)) {
|
|
445
445
|
url.path.push('')
|
|
446
446
|
}
|
|
447
447
|
} else if (isSingleDotPathSegment(buffer)) {
|
|
448
|
-
if (c !== 0x2f && !isSpecial(url) && c === 0x5c) {
|
|
448
|
+
if (c !== 0x2f && !(isSpecial(url) && c === 0x5c)) {
|
|
449
449
|
url.path.push('')
|
|
450
450
|
}
|
|
451
451
|
} else {
|
|
452
452
|
if (url.scheme === 'file' && url.path.length === 0 && isWindowsDriveLetter(buffer)) {
|
|
453
|
-
buffer
|
|
453
|
+
buffer = buffer.substring(0, 1) + ':' + buffer.substring(2)
|
|
454
454
|
}
|
|
455
455
|
|
|
456
456
|
url.path.push(buffer)
|