Currently, if a link ([text](link)) does not match a URL scheme (e.g. 'http://...') then it is treated as an internal cross-reference (to a reference target or sphinx document, etc):
|
url_check = urlparse(destination) |
|
# If there's not a url scheme (e.g. 'https' for 'https:...' links), |
|
# or there is a scheme but it's not in the list of known_url_schemes, |
|
# then assume it's a cross-reference |
In some use cases a configuration option could be useful, such that links with certain extensions (or regexes) are converted to external links, rather than attempting to resolve them as internal links
Originally posted by @chrisjsewell in jupyter-book/jupyter-book#823 (comment)
Currently, if a link (
[text](link)) does not match a URL scheme (e.g. 'http://...') then it is treated as an internal cross-reference (to a reference target or sphinx document, etc):MyST-Parser/myst_parser/docutils_renderer.py
Lines 412 to 415 in 3d5ae4f
In some use cases a configuration option could be useful, such that links with certain extensions (or regexes) are converted to external links, rather than attempting to resolve them as internal links
Originally posted by @chrisjsewell in jupyter-book/jupyter-book#823 (comment)