Commit 5cd20d8d authored by Alex Kalderimis's avatar Alex Kalderimis

Allow routes to be regexps

parent 0008cffa
......@@ -74,7 +74,7 @@ module Referable
#{Regexp.escape(Gitlab.config.gitlab.url)}
\/#{Project.reference_pattern}
(?:\/\-)?
\/#{Regexp.escape(route)}
\/#{route.is_a?(Regexp) ? route : Regexp.escape(route)}
\/#{pattern}
(?<path>
(\/[a-z0-9_=-]+)*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment