Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix capture group replacement in URLFor / URLWith #274

Merged
merged 2 commits into from
Jun 17, 2014

Conversation

thevisus
Copy link
Contributor

When using standard syntax for capture groups, the replacements are not properly made in URLFor when given sufficient arguments.

Adjusting the regex in URLWith to include the (?P...) syntax addresses the issue without impact to existing behavior.

if specifying a standard capture group (as specified by
http://golang.org/pkg/regexp/syntax/) in a route, the replacement
in URLWith needs to include the appropriate regex, in addition
to the :name sugar
@brokenpeace
Copy link

👍 Works perfect!

@erizocosmico
Copy link
Member

Awesome! Merging!

erizocosmico pushed a commit that referenced this pull request Jun 17, 2014
Fix capture group replacement in URLFor / URLWith
@erizocosmico erizocosmico merged commit 9af2cc2 into go-martini:master Jun 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants