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
According to its schema, in Doxygen's XML output, "sect2" tags should only appear inside "sect1" elements, either directly or inside an "internal" element. However, if there is a doc string with a level 2 header and no level 1 headers, the output will not have any "sect1" elements, yet still have a "sect2" element. The same is true with "sect3" if you only have a level 3 header.
The current Breathe simply ignores stray "sect2" and "sect3" tags. I wish to fix this in my fork/pull-request, especially since I added a test for headers and I don't want the test to imply that ignoring the tags is the prescribed solution, but I'm not sure how to best handle this. For properly nested sect# tags, Breathe will generate Docutils "section" nodes. According to the Docutils documentation, sections need a title, so I can't just wrap the titled sections with untitled ones to match the nesting depth. Possible solutions are to treat the top-level sect# like "sect1" regardless of the number, or to not generate any section nodes and to treat the titles the same way "heading" elements are currently treated (wrap the title content in an "emphasis" node).
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
According to its schema, in Doxygen's XML output, "sect2" tags should only appear inside "sect1" elements, either directly or inside an "internal" element. However, if there is a doc string with a level 2 header and no level 1 headers, the output will not have any "sect1" elements, yet still have a "sect2" element. The same is true with "sect3" if you only have a level 3 header.
The current Breathe simply ignores stray "sect2" and "sect3" tags. I wish to fix this in my fork/pull-request, especially since I added a test for headers and I don't want the test to imply that ignoring the tags is the prescribed solution, but I'm not sure how to best handle this. For properly nested sect# tags, Breathe will generate Docutils "section" nodes. According to the Docutils documentation, sections need a title, so I can't just wrap the titled sections with untitled ones to match the nesting depth. Possible solutions are to treat the top-level sect# like "sect1" regardless of the number, or to not generate any section nodes and to treat the titles the same way "heading" elements are currently treated (wrap the title content in an "emphasis" node).
I would appreciate some guidance on the matter.
Beta Was this translation helpful? Give feedback.
All reactions