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

":" creates a wrong regexp #109

Open
totty90 opened this issue Jun 28, 2014 · 3 comments
Open

":" creates a wrong regexp #109

totty90 opened this issue Jun 28, 2014 · 3 comments

Comments

@totty90
Copy link

totty90 commented Jun 28, 2014

For the route "'xy:{x},{y}'" creates: "/^/?xy:/([^\/?]+),([^\/?]+)/?$/i" instead of "/^/?xy:([^\/?]+),([^\/?]+)/?$/i"

Test here: http://www.regexr.com/ the string "xy:34234,-2342"

@totty90
Copy link
Author

totty90 commented Jun 28, 2014

Or maybe the ":" is used for the variables. But please let me use it anyway, even escaping it somehow.

@millermedeiros
Copy link
Owner

I made the wrong assumption that : was always the end of an optional argument and always going to need / in between 2 arguments.

@millermedeiros
Copy link
Owner

see:

'RS' : {
//required slashes
//used to insert slash between `:{` and `}{`
rgx : /([:}])\/?(\{)/g,
save : '$1{{id}}$2',
res : '\\/'
},

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

No branches or pull requests

2 participants