I am writing some sphinx documentation. Suppose classes Foo
and Bar
are in the documentation. Elsewhere I would like to say
A :class:`~.Foo` contains multiple :class:`~.Bar`s.
and get [Foo] to be linked and a link that looks like [Bar]s,
A [Foo] contains multiple [Bar]s.
but get a warning
WARNING: Inline interpreted text or phrase reference start-string without end-string.
and a failure to render / link. The rendered page looks like
A [Foo] contains multiple :class:`~.Bar`s.
instead.
How may I achieve an automatic link to a class + a suffix (like -s, -ly, -ing) but no space in between in rst/restructured text/sphinx?