sphinx
sphinx copied to clipboard
[docs] clarify the usage of `versionadded` & co
Describe the bug
It's interesting to see that the
::
construction fails when inside theversionadded/versionchanged
directive. It might actually be an issue in Sphinx (because otherwise, the::
should be smart).
Originally posted in https://github.com/python/cpython/issues/120091#issuecomment-2150319649
I'm not really sure how to make it work but if it's too much work, let's just indicate the behaviour in the documentation of .. versionadded
& co directives.
How to Reproduce
Welcome to documentation!
=========================
It is now::
>>> ok
It is now2::
>>> ok
.. versionadded:: 3.14 It is
now3::
>>> ok
.. versionadded:: 3.14 It is
now4::
>>> ok
.. versionadded:: 3.14
It is now5::
>>> ok
.. versionadded:: 3.14
It is now6::
>>> ok
produces