Permalink
Browse files

have to construct params manually.

  • Loading branch information...
1 parent d44317e commit 906a74081da9bfcfb000335b6bfb1158f53fbf35 @joshbuddy committed Jul 9, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/sherpa.js
View
6 lib/sherpa.js
@@ -162,7 +162,11 @@ Sherpa.Node.prototype = {
var lin = this.linear[linearIdx];
var match = lin[0].exec(wholePath);
if (match) {
- var newParams = params.concat(match.slice(0, lin[1]));
+ var matchedParams = [];
+ for (var matchIdx = 1; matchIdx <= lin[1] + 1; matchIdx++) {
+ matchedParams.push(match[matchIdx]);
+ }
+ var newParams = params.concat(matchedParams);
matchedIndex = match.shift().length;
var resplitParts = wholePath.substring(matchedIndex).split('/');
if (resplitParts.length == 1 && resplitParts[0] == '') resplitParts.shift();

0 comments on commit 906a740

Please sign in to comment.