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

More fine-grained control over what is an "external link" #641

Open
2 tasks
infinity0 opened this issue Oct 27, 2022 · 2 comments
Open
2 tasks

More fine-grained control over what is an "external link" #641

infinity0 opened this issue Oct 27, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@infinity0
Copy link

Context

I have a use case where I am mixing MyST .md files and docutils .rst files, and I would like to link between the two.

Linking from rst to md is fine, I can pass a relative link that ends in .html to docutils, and it swallows this with no complaints, and generates the correct output.

Linking from md to rst is not fine, because MyST has a special treatment for links:

Proposal

What would be better is if MyST failed gracefully and did not generate a system error message when myst_all_links_external is False, and just allow the failed resolution (i.e. of a .html relative link) to go through just as normal rst-docutils does.

I am not sure why the current behaviour is so strict, but if this strictness is really desired, then enabling this more relaxed behaviour via a config flag like myst_lenient_internal_links would also be fine.

Tasks and updates

  • decide whether the current strictness is really necessary
  • implement leniency either via a new config option, or replace the current behaviour
@infinity0 infinity0 added the enhancement New feature or request label Oct 27, 2022
@chrisjsewell
Copy link
Member

heya, this and #640 are essentially covered in #613

@infinity0
Copy link
Author

That sounds great! Just wanted to add that my own use-case is docutils only and does not depend on sphinx, so I hope all the features that #613 talks about continue to work outside of sphinx too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants