Turn reference URLs into hyperlinks #2234
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
References in the References section should include a link, if a URL is provided. Fixes issue #658.
I changed my mind many times about how this should be implemented. At first, I thought that we should separately provide "description" and "URL" fields for authors to edit.
But now I think, actually, the URL is part of the formal reference, and should be displayed as text for transparency's sake. So I think it's better for the URL to be extracted automatically from the description.
On the other hand, I don't want to have ad-hoc parsing rules applied at runtime to published content. (It's possible those rules might change in the future, which I think is okay for active but not for published projects.) So I ended up with this approach:
description
andurl
separately via Django admin, but it will only appear as a link if theurl
appears verbatim within thedescription
.