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

Check for http protocol before urlize #3755

Merged
merged 1 commit into from Mar 9, 2018
Merged

Conversation

@stsewd
Copy link
Member

@stsewd stsewd commented Mar 9, 2018

Fix #2085
With http protocol
screenshot-2018-3-8 bookpy read the docs
With git protocol
screenshot-2018-3-8 bookpy-git read the docs

Copy link
Contributor

@agjohnson agjohnson left a comment

Nice catch, looks great for now!

I was going to say we could take a pragmatic approach to this and create a property on Project that ran Project.repo through urlparse, but really, the slice conditional does what we need to do, and this is for display only.

@humitos
Copy link
Member

@humitos humitos commented Mar 9, 2018

Yeah! I was thinking the same as @agjohnson, then I thought that it could be a template filter (in case we need to re use it). I'm 👍 on merging this as it is for now.

Altough if you know that we have more places where we will need this you can write a template filter --could be useful for .com also, since we may need to write the same code in the similar template.

@stsewd
Copy link
Member Author

@stsewd stsewd commented Mar 9, 2018

@agjohnson @humitos I was thinking the same, but felt like was over-thinking it, also I did a grep and this is the only place where this is used.

@agjohnson
Copy link
Contributor

@agjohnson agjohnson commented Mar 9, 2018

Haha well I'm glad everyone was thinking the same thing here. Looks like we can merge!

@agjohnson agjohnson merged commit baa6b07 into readthedocs:master Mar 9, 2018
1 check passed
@stsewd stsewd deleted the fix-repo-url branch Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants