You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The use of an only-directive that is nested inside of a parent only-directive to conditionally include a directive of the Sphinx plugin breathe fails since Sphinx 7.2. Sphinx<=7.1.2 supports this use case.
/home/user/git/minimal-doc/<partial node>:: WARNING: unknown node type: <only: <list_item...><list_item...><list_item...>>
Traceback (most recent call last):
...
File "/home/user/git/minimal-doc/venv/lib/python3.10/site-packages/sphinx/util/docutils.py", line 743, in dispatch_departure
super().dispatch_departure(node)
File "/home/user/git/minimal-doc/venv/lib/python3.10/site-packages/docutils/nodes.py", line 2005, in dispatch_departure
return method(node)
File "/home/user/git/minimal-doc/venv/lib/python3.10/site-packages/docutils/nodes.py", line 2027, in unknown_departure
raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.html5.HTML5Translator'> departing unknown node type: only
Exception occurred:
File "/home/user/git/minimal-doc/venv/lib/python3.10/site-packages/docutils/nodes.py", line 2027, in unknown_departure
raise NotImplementedError(
NotImplementedError: <class 'sphinx.writers.html5.HTML5Translator'> departing unknown node type: only
How to Reproduce
My minimal git repository contains build output of doxygen, needed for the breathe directive (doxygenfile) to function, which is required to reproduce the bug.
git clone [email protected]:JasperCraeghs/minimal-doc.git
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements.txt
make html
My index.rst:
minimal-doc documentation
=========================
.. only:: html
hello world
.. only:: not text
.. doxygenfile:: component.c
The following made me realize that this is likely a bug in sphinx and not in breathe: #10502
I can use directives of other Sphinx plugins in a nested only-directive. The crash is specific to the directives of the breathe plugin. The version of docutils doesn't seem to matter.
The text was updated successfully, but these errors were encountered:
Describe the bug
The use of an
only
-directive that is nested inside of a parentonly
-directive to conditionally include a directive of the Sphinx pluginbreathe
fails since Sphinx 7.2. Sphinx<=7.1.2 supports this use case.How to Reproduce
My minimal git repository contains build output of doxygen, needed for the
breathe
directive (doxygenfile
) to function, which is required to reproduce the bug.My
index.rst
:Environment Information
Sphinx extensions
["breathe"]
Additional context
The following made me realize that this is likely a bug in
sphinx
and not inbreathe
: #10502I can use directives of other Sphinx plugins in a nested
only
-directive. The crash is specific to the directives of thebreathe
plugin. The version ofdocutils
doesn't seem to matter.The text was updated successfully, but these errors were encountered: