Skip to content

Commit baa7680

Browse files
committed
add documentation on hyperlinks
1 parent 55d1560 commit baa7680

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

doc/format.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,24 @@ Other points to keep in mind
597597
(i.e. scalar types, sequence types), those arguments can be documented
598598
with type `array_like`.
599599

600+
* Links : If you need to include hyperlinks in your docstring, note that
601+
some docstring sections are not parsed as standard reST, and in these
602+
sections, numpydoc may become confused by hyperlink targets such as::
603+
604+
.. _Example: http://www.example.com
605+
606+
If the Sphinx build issues a warning of the form
607+
``WARNING: Unknown target name: "example"``, then that is what is happening.
608+
There are two possible workarounds. First, the inline form can be used::
609+
610+
`Example <http://www.example.com>`_
611+
612+
Second, the hyperlink target can be placed in a section that *is* parsed
613+
as standard reST, such as **Notes**. The inline form is recommended, since
614+
it is more likely to "just work", and not require trial-and-error
615+
experimentation with target placement.
616+
617+
600618
Common reST concepts
601619
--------------------
602620
For paragraphs, indentation is significant and indicates indentation in the

0 commit comments

Comments
 (0)