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

Allow a placeholder in programmatic go links to include slashes #149

Open
nsinghfigma opened this issue May 6, 2022 · 0 comments
Open

Comments

@nsinghfigma
Copy link

Right now in a programmatic go link, a %s will only include text in between slashes.

For example:
If go/cs/%s -> https://cs.github.com/?q=%s
then go/cs/blah will redirect me to https://cs.github.com/?q=blah
but go/cs/foo/bar will not redirect to https://cs.github.com/?q=foo/bar. (This is particularly relevant when searching for file paths.)

We'd probably need another placeholder token (maybe%q?) as to not conflict with allowing multiple placeholders.

For now one verbose workaround is to do something like:
go/cs/%s -> https://cs.github.com/?q=%s
go/cs/%s/%s -> https://cs.github.com/?q=%s/%s
go/cs/%s/%s/%s -> https://cs.github.com/?q=%s/%s/%s
go/cs/%s/%s/%s/%s -> https://cs.github.com/?q=%s/%s/%s/%s
... until you get to the max depth that you care about.

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

1 participant