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

Adding support for escaped parentheses in Route Paths #2533

Closed
wants to merge 1 commit into from
Closed

Adding support for escaped parentheses in Route Paths #2533

wants to merge 1 commit into from

Conversation

Zoxive
Copy link

@Zoxive Zoxive commented Nov 12, 2015

Our app has slightly different urls than most, but they are still valid to all browsers. We use parentheses to surround our entity ids. ex: #/Order(1).

First time pull request ever, let me know what I can do/fix.

Here's the gist of what I would like written in one of the tests:

describe('and a param is parentheses escaped with additional param', function () {
    const pattern = '/comments\\(:id\\)/:mode'

    it('returns the correct path when param is supplied', function () {
        expect(formatPattern(pattern, { id:'123', mode: 'edit' })).toEqual('/comments(123)/edit')
    })
})

@taion
Copy link
Contributor

taion commented Nov 12, 2015

My inclination is to not merge this - we could only release this for 1.1.x anyway, and hopefully by then we will have merged #2286.

@taion
Copy link
Contributor

taion commented Nov 12, 2015

@Zoxive You okay with that? I just think we get a lot more by factoring out the pattern matching.

@Zoxive
Copy link
Author

Zoxive commented Nov 12, 2015

@taion Yes as long as something equivalent is on the roadmap I'm happy.

@taion
Copy link
Contributor

taion commented Nov 12, 2015

Keep an eye on https://github.com/itajaja/url-matcher, then, and consider PRing to there. I think it's heading in a pretty good direction. Going to close this PR for now.

@taion taion closed this Nov 12, 2015
@sebastiandeutsch
Copy link
Contributor

I have the same problem with an app right now. I need URLs that contain round brackets - a hacky workaround is to use the '*' but I'd love to see a proper implementation. What was wrong again with this PR?

@lock lock bot locked as resolved and limited conversation to collaborators Jan 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants