Skip to content

Commit 7daa59f

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

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

documentation/style-guide.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,16 +193,15 @@ 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 a Sphinx extension to suppress links within a section to the same
197+
section. Previously, editors had to carefully use an exclamation mark in a
198+
Sphinx reference (``:func:`!map```) to prevent such links.
200199

201200
Do not use links in section headers. They distract from the title of the
202201
section. The term will be mentioned in the paragraph text and can be linked
203202
from there.
204203

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

0 commit comments

Comments
 (0)