File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -290,10 +290,22 @@ they should be marked simply with ``*var*``.
290290
291291For all other roles, you have to write ``:rolename:`content` ``.
292292
293- .. note ::
293+ There are some additional facilities that make cross-referencing roles more
294+ versatile:
295+
296+ * You may supply an explicit title and reference target, like in reST direct
297+ hyperlinks: ``:role:`title <target>` `` will refer to *target *, but the link
298+ text will be *title *.
299+
300+ * If you prefix the content with ``! ``, no reference/hyperlink will be created.
301+
302+ * For the Python object roles, if you prefix the content with ``~ ``, the link
303+ text will only be the last component of the target. For example,
304+ ``:meth:`~Queue.Queue.get` `` will refer to ``Queue.Queue.get `` but only
305+ display ``get `` as the link text.
294306
295- For all cross-referencing roles, if you prefix the content with `` ! ``, no
296- reference/hyperlink will be created .
307+ In HTML output, the link's `` title `` attribute (that is e.g. shown as a
308+ tool-tip on mouse-hover) will always be the full target name .
297309
298310The following roles refer to objects in modules and are possibly hyperlinked if
299311a matching identifier is found:
You can’t perform that action at this time.
0 commit comments