Skip to content

Commit d0490f2

Browse files
committed
Fix #5 by not assuming urls to include ://
1 parent 1f8a8d4 commit d0490f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class NetlifyPaths {
7676
fixPath(imagePath) {
7777
let out = imagePath
7878
if (imagePath !== undefined) {
79-
if (/^\w/.test(imagePath) && !/:\/\//.test(imagePath))
79+
if (/^\w/.test(imagePath) && !/^[a-z][a-z0-9+.-]*:/i.test(imagePath))
8080
out = path.join(this.mediaFolder, imagePath)
8181
else if (imagePath.startsWith(this.publicFolder))
8282
out = path.join(

0 commit comments

Comments
 (0)