Merge pull request #746 from rschamp/bugfix/token-path

Don't require end slashes when replacing arguments
This commit is contained in:
Ray Schamp 2016-07-22 11:48:03 -04:00 committed by GitHub
commit 44c2b55f14

View file

@ -58,7 +58,7 @@ var getViewPaths = function (routes) {
* all :arguments become .+? * all :arguments become .+?
*/ */
var expressPatternToRegex = function (pattern) { var expressPatternToRegex = function (pattern) {
return pattern.replace(/(:[^/]+)\//gi, '.+?/'); return pattern.replace(/(:[^/]+)/gi, '.+?');
}; };
/* /*