Permalink
Browse files

Merge pull request #29 from pyr/patch-1

Make sure regexp is performed against a string.
  • Loading branch information...
2 parents f0eace3 + ff4a757 commit bcaef85822cd97f2f9e1c9e69257e8ba7ce43702 @weavejester weavejester committed Aug 26, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ring-core/src/ring/middleware/nested_params.clj
@@ -6,7 +6,7 @@
\"foo[bar][][baz]\"
=> [\"foo\" \"bar\" \"\" \"baz\"]"
[param-name]
- (let [[_ k ks] (re-matches #"(.*?)((?:\[.*?\])*)" param-name)
+ (let [[_ k ks] (re-matches #"(.*?)((?:\[.*?\])*)" (name param-name))
keys (if ks (map second (re-seq #"\[(.*?)\]" ks)))]
(cons k keys)))

0 comments on commit bcaef85

Please sign in to comment.