-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Use anonymous references for links with embedded URLs #13615
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
base: master
Are you sure you want to change the base?
Conversation
b0ff0f7
to
bd1adac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with nits.
There is one more syntax but it would be confusing to state it here. It is `Link text <goto_>`__
, with the .. _goto:
standing after the paragraph. As I reported at #13576 (comment), with Docutils 0.21.2, even with a single underscore one could use this with identical Link text
e.g. See `DOI <goto1_>`_ or `DOI <goto2_>`_
without Docutils raising warnings but this is no more true since Docutils r10151.
Use ```Link text <https://domain.invalid/>`_`` for inline web links. If the | ||
link text should be the web address, you don't need special markup at all, the | ||
parser finds links and mail addresses in ordinary text. | ||
URLs and email addresses in text are automatically linked an do no need explicit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo(s) "an do no need"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @timhoffm I do not know why but this is still standing as far as I can see, so I temporarily "unresolve" this conversation...
cc: @gmilde |
bd1adac
to
02cc1df
Compare
Use two trailing underscores when embedding the URL. - Technically, a | ||
single underscore works as well, but that would create a named reference | ||
instead of an anonymous one. Named references typically do not have a | ||
benefit when the URL is embedded. However, they have the disadvantage that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe s/However/Moreover/
in view of previous sentence.
Closes #13613.
The explanation got a bit longer than I would have liked. But I think it's important to make people aware that they should use two underscoes even though one may also work. And if we do that, we need to briefly explain the difference.