-
Notifications
You must be signed in to change notification settings - Fork 77
Description
The anatomy of a reference role is that
- By default, the
title == target, e.g.:name:`target` - The title can be separated from the title using
<>, e.g.:name:`title <target>` - The reference can be disabled if the content starts with
!, e.g.:name:`!target`or:name:`!title <target>` - The
<or!can be escaped with\, e.g.:name:`title \<target>`or:name:`\!target`
Firstly, it is of note that for all need / need_incoming / need_outgoing/ need_part, they are set as sphinx.XRefRole.
For all of these, the disabling of the role with ! works, i.e. a reference/part is not created for these.
It is not clear if this is even intended, nor is it documented.
For the title/target syntax, the need role works as expected.
For need_incoming / need_outgoing/ need_part, though this syntax is parsed, it is not used in an understandable way:
e.g. for :name:`title <target>`,
- for
need_incoming/need_outgoingonly thetargetis used and thetitleis disregarded - for
need_partonly thetitleis used and thetargetis disregarded
Additionally, need_part, splits up id/content like (id) content, but does not account for space in between the ) and start of content
also there is no warning if need_part is not in a need directive, they are just silently ignored