Skip to content

Commit

Permalink
Resolve full title for doxygenpage and doxygengroup and allow for omi…
Browse files Browse the repository at this point in the history
…tting the title all together (#939)
  • Loading branch information
RaumZeit authored Jul 30, 2024
1 parent 354a2fe commit 6c8f9de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
6 changes: 5 additions & 1 deletion breathe/directives/content_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ class DoxygenNamespaceDirective(_DoxygenContentBlockDirective):
class DoxygenGroupDirective(_DoxygenContentBlockDirective):
kind = "group"
option_spec = _DoxygenContentBlockDirective.option_spec.copy()
option_spec.update({"inner": flag})
option_spec.update({
"inner": flag,
"no-title": flag
})


class DoxygenPageDirective(_DoxygenContentBlockDirective):
Expand All @@ -115,4 +118,5 @@ class DoxygenPageDirective(_DoxygenContentBlockDirective):
"path": unchanged_required,
"project": unchanged_required,
"content-only": flag,
"no-title": flag,
}
14 changes: 11 additions & 3 deletions breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1192,9 +1192,17 @@ def render_signature(file_data, doxygen_target, name, kind):
title_signode.extend(targets)

# Set up the title
title_signode.append(nodes.emphasis(text=kind))
title_signode.append(nodes.Text(" "))
title_signode.append(addnodes.desc_name(text=name))

if kind in ["group", "page"] and file_data.compounddef and file_data.compounddef.title:
if "no-title" not in options:
full_title = " ".join([i.getValue() for i in file_data.compounddef.title.content_])
title_signode.append(nodes.emphasis(text=kind))
title_signode.append(nodes.Text(" "))
title_signode.append(addnodes.desc_name(text=full_title))
else:
title_signode.append(nodes.emphasis(text=kind))
title_signode.append(nodes.Text(" "))
title_signode.append(addnodes.desc_name(text=name))

rst_node.append(title_signode)

Expand Down

0 comments on commit 6c8f9de

Please sign in to comment.