Skip to content

Commit 69d2ecb

Browse files
committed
wordsmithing
1 parent 02cc1df commit 69d2ecb

File tree

1 file changed

+19
-12
lines changed

1 file changed

+19
-12
lines changed

doc/usage/restructuredtext/basics.rst

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -208,32 +208,39 @@ Hyperlinks
208208
External links
209209
~~~~~~~~~~~~~~
210210

211-
URLs and email addresses in text are automatically linked an do not need
211+
URLs and email addresses in text are automatically linked and do not need
212212
explicit markup at all.
213+
For example, https://domain.invalid/ is written with no special markup
214+
in the source of this document, and is recognised as an external hyperlink.
213215

214-
To create text with a link, it's advisable to put the URL below the paragraph
215-
like this (:duref:`ref <hyperlink-targets>`)::
216+
To create text with a link, the best approach is generally to put the URL
217+
below the paragraph as follows (:duref:`ref <hyperlink-targets>`)::
216218

217219
This is a paragraph that contains `a link`_.
218220

219221
.. _a link: https://domain.invalid/
220222

221223
This keeps the paragraph more readable in source code.
222224

223-
Alternatively, you can embed the URL using the syntax
224-
```Link text <https://domain.invalid/>`__``
225+
Alternatively, you can embed the URL within the prose for an 'inline link'.
226+
This can lead to longer lines, but has the benefit of keeping the link text
227+
and the URL pointed to in the same place.
228+
This uses the following syntax: ```Link text <https://domain.invalid/>`__``
225229
(:duref:`ref <embedded-uris-and-aliases>`).
226230

227231
.. important::
228232

229-
There must be a space between the link text and the opening \< for the URL.
233+
There must be a space between the link text
234+
and the opening angle bracket ('``<``') for the URL.
230235

231-
Use two trailing underscores when embedding the URL. - Technically, a
232-
single underscore works as well, but that would create a named reference
233-
instead of an anonymous one. Named references typically do not have a
234-
benefit when the URL is embedded. However, they have the disadvantage that
235-
you must make sure that you do not use "Link text" in another link in your
236-
document.
236+
.. tip::
237+
238+
Use two trailing underscores when embedding the URL.
239+
Technically, a single underscore works as well,
240+
but that would create a named reference instead of an anonymous one.
241+
Named references typically do not have a benefit when the URL is embedded.
242+
Moreover, they have the disadvantage that you must make sure that you
243+
do not use the same "Link text" for another link in your document.
237244

238245
You can also separate the link and the target definition (:duref:`ref
239246
<hyperlink-targets>`), like this::

0 commit comments

Comments
 (0)