Skip to content

changes to SphinxRenderer.handle_declaration in v4.36 pollute the TOC #1042

@rileyjmurray

Description

@rileyjmurray

Hi folks!

First, my thanks to everyone who's been involved in keeping this project going since Michael's project status announcement in July 2024.

I recently rebuilt the docs for my project and found messy results in going from breathe 4.35 to 4.36. Specifically, the TOC gets polluted with members of enums and structs. Here's an after-and-before screenshot showing how this manifests in my project.

Image

My issue is fixed if I check out 4.36 from source, and delete the following lines:

# Insert the member name for use in Sphinx-generated table of contents.
if isinstance(node, parser.Node_compounddefType):
member_name = node.compoundname
else:
member_name = node.name
if obj_type == "function":
member_name += "()"
sig.attributes["_toc_name"] = member_name
sig.attributes["_toc_parts"] = member_name

I'd open a PR removing these lines, but I'd like to know what the motivation was for adding them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions