Skip to content

Commit 69e6871

Browse files
committed
update the link guidance now that we suppress them automatically
1 parent 7c37b96 commit 69e6871

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

documentation/style-guide.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,18 @@ the second mention is more appropriate for a link. Some units are long enough
193193
to have a few repeated links. Use judgement to decide when a link will help
194194
the reader.
195195

196-
Do not use a link when the link would point to the current unit. It's natural
197-
to use the name of a function in the documentation for the function, but a link
198-
on that function name that simply reloads the section the user is already
199-
reading is useless and distracting.
196+
We use the `linklint Sphinx extension`__ to suppress two kinds of excessive
197+
links: references in a section to itself and duplicate references in a
198+
paragraph. Previously, editors had to carefully use an exclamation mark in a
199+
Sphinx reference (``:func:`!map```) to prevent such links.
200+
201+
__ https://pypi.org/project/linklint/
200202

201203
Do not use links in section headers. They distract from the title of the
202204
section. The term will be mentioned in the paragraph text and can be linked
203205
from there.
204206

205-
Sphinx provides ways to automatically add links to references, and a way to
207+
Sphinx automatically adds links to references, and a way to
206208
suppress the link. Using roles like ``:func:`map``` will link to the
207209
documentation for ``map``. You can suppress the link while keeping the
208210
semantic presentation of the function name by adding an exclamation point

0 commit comments

Comments
 (0)