diff options
| author | Georg Brandl <georg@python.org> | 2009-01-26 21:29:38 (GMT) |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-01-26 21:29:38 (GMT) |
| commit | 0c2430beda789335d70a4db34c02b32ed65e23bb (patch) | |
| tree | 77195b856aedfca252ee42562cc8092d7e05af99 | |
| parent | 354cfc133040424ecaa05a4933917c23efc665f6 (diff) | |
| download | cpython-0c2430beda789335d70a4db34c02b32ed65e23bb.zip cpython-0c2430beda789335d70a4db34c02b32ed65e23bb.tar.gz cpython-0c2430beda789335d70a4db34c02b32ed65e23bb.tar.bz2 | |
Copy over docs on advanced role features from Sphinx docs.
| -rw-r--r-- | Doc/documenting/markup.rst | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/Doc/documenting/markup.rst b/Doc/documenting/markup.rst index b4b03d2..3ca8983 100644 --- a/Doc/documenting/markup.rst +++ b/Doc/documenting/markup.rst @@ -290,10 +290,22 @@ they should be marked simply with ``*var*``. For all other roles, you have to write ``:rolename:`content```. -.. note:: +There are some additional facilities that make cross-referencing roles more +versatile: + +* You may supply an explicit title and reference target, like in reST direct + hyperlinks: ``:role:`title <target>``` will refer to *target*, but the link + text will be *title*. + +* If you prefix the content with ``!``, no reference/hyperlink will be created. + +* For the Python object roles, if you prefix the content with ``~``, the link + text will only be the last component of the target. For example, + ``:meth:`~Queue.Queue.get``` will refer to ``Queue.Queue.get`` but only + display ``get`` as the link text. - For all cross-referencing roles, if you prefix the content with ``!``, no - reference/hyperlink will be created. + In HTML output, the link's ``title`` attribute (that is e.g. shown as a + tool-tip on mouse-hover) will always be the full target name. The following roles refer to objects in modules and are possibly hyperlinked if a matching identifier is found: |
