delvedor/find-my-way

Literal asterisk in url

subhero24 opened this issue · 6 comments

Is there a way to escape the asterisk * in the url to match the character literally?
Falling back to a regular expression like "/some/url/:asterisk(^\\*)" works, but I was wondering if this is the preferred way to do it?

Hi, there is no other way to do it, right now.

Would you like me to create a PR for this? If so, let me know how the asterisk should be escaped.

To escape the colon in the path we use double colon "::". We could use a double asterisk to avoid a wildcard node, or we can continue using the leading colon as an escape symbol.

/test/:*hello
/test/**hello

I can't say right now that I like one of the options. You can reopen this issue and we will think about it.

Is this issue still available??

Is this issue still available??

I don't have a good solution for this. I don't think that bringing another exception rule into router logic is worth it.

Okay so how will this issue be resolved @ivan-tymoshenko