Permalink
Browse files

Make sure regexp is performed against a string. This helps the rare c…

…ase where keyword params already exist at this point.
  • Loading branch information...
1 parent f0eace3 commit ff4a757e1009281aaa77f946664a95781ae96054 @pyr pyr committed Aug 23, 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 ff4a757

Please sign in to comment.