Skip to content

Commit

Permalink
Fix regex that caused Mustermann::CompileError
Browse files Browse the repository at this point in the history
exercism.io/vendor/bundle/ruby/2.3.0/gems/mustermann-1.0.0/lib/mustermann/regular.rb:40:in
`check_anchors': regular expression should not contain $:
"\\/submissions\\/(?<key>\\w+)\\/(nitpick$|(\\+?un)?like$)"
(Mustermann::CompileError)

exercism.io/vendor/bundle/ruby/2.3.0/gems/mustermann-1.0.0/lib/mustermann/regular.rb:40:in
`check_anchors': regular expression should not contain ^:
"^\\/submissions\\/(?<key>\\w+)\\/(nitpick$|(\\+?un)?like$)"
(Mustermann::CompileError)
  • Loading branch information
Insti committed May 9, 2017
1 parent 58d13de commit 7e750e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/routes/submissions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Submissions < Core
redirect "/submissions/#{key}"
end

get %r{^/submissions/(?<key>\w+)/(nitpick$|(\+?un)?like$)} do |key|
get %r{/submissions/(?<key>\w+)/(nitpick|(\+?un)?like)} do |key|
redirect "/submissions/#{key}"
end

Expand Down

0 comments on commit 7e750e0

Please sign in to comment.