Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Bugfix: External links to 'supported' files lose their file extension #181

Merged
merged 2 commits into from
May 19, 2020

Conversation

limasierra
Copy link

Hi,

This PR fixes the erroneous handling of external links to 'supported' files.

Until now, the extension of every supported type has been stripped.

Adding an additional check ("if not scheme_known") was sufficient to avoid doing this for external links.

Example:

A link to http://example.com/README.md will point to http://example.com/README without this fix, since 'md' is a supported type.

Example 2:

Simply linking to this project's README file is impossible at the moment:
https://github.com/readthedocs/recommonmark/blob/master/README.md becomes https://github.com/readthedocs/recommonmark/blob/master/README, which of course doesn't exist.

Laurent Seiler added 2 commits November 4, 2019 16:10
Fixes the following TODO:
# TODO this should probably only remove the extension for local paths,
# i.e. not uri's starting with http or other external prefix.

Concrete example:
Links to external files with supported extensions (e.g. .md) were broken, e.g. external links to Github README.md files.
Gabriella439 added a commit to dhall-lang/dhall-lang that referenced this pull request Feb 23, 2020
Fixes #920

The problem is due to a bug in `recommonmark` which is fixed by this
pull request:

readthedocs/recommonmark#181

... and this change applies the changes in that pull request as a patch to
`recommonmark`.

This includes an upgrade to `nixpkgs` because the version we were using
had an older version of `recommonmark` where the patch didn't cleanly apply.
Gabriella439 added a commit to dhall-lang/dhall-lang that referenced this pull request Feb 23, 2020
Fixes #920

The problem is due to a bug in `recommonmark` which is fixed by this
pull request:

readthedocs/recommonmark#181

... and this change applies the changes in that pull request as a patch to
`recommonmark`.

This includes an upgrade to `nixpkgs` because the version we were using
had an older version of `recommonmark` where the patch didn't cleanly apply.
Gabriella439 added a commit to dhall-lang/dhall-lang that referenced this pull request Feb 24, 2020
Fixes #920

The problem is due to a bug in `recommonmark` which is fixed by this
pull request:

readthedocs/recommonmark#181

... and this change applies the changes in that pull request as a patch to
`recommonmark`.

This includes an upgrade to `nixpkgs` because the version we were using
had an older version of `recommonmark` where the patch didn't cleanly apply.
@beckermr
Copy link

@ericholscher any chance this one can be merged?

@mzjp2
Copy link

mzjp2 commented May 19, 2020

Quick bump here to ask when this can be merged? :)

@timonsku
Copy link

Would it be possible to make a new release with this commit? Quite a few dependants are broken because of it :)

@theacodes
Copy link

Gentle nudge here - we'd love a new release.

@ericholscher
Copy link
Member

Sorry, I will make sure this happens this week.

@theacodes
Copy link

theacodes commented Dec 14, 2020 via email

@ericholscher
Copy link
Member

A new version has now been released with this 👍

@theacodes
Copy link

theacodes commented Dec 17, 2020 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants