Skip to content

Commit b1d0063

Browse files
committed
Match entire substring when using options.end.
1 parent 88ecb9a commit b1d0063

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
@@ -40,7 +40,7 @@ function pathtoRegexp(path, keys, options) {
4040
+ (optional ? '' : slash)
4141
+ '(?:'
4242
+ (optional ? slash : '')
43-
+ (format || '') + (capture || (format && '([^/.]+?)' || '([^/]+?)')) + ')'
43+
+ (format || '') + (capture || (format && '([^/.]+)' || '([^/]+)')) + ')'
4444
+ (optional || '')
4545
+ (star ? '(/*)?' : '');
4646
})

0 commit comments

Comments
 (0)