Skip to content

Commit 355d2bb

Browse files
committed
transmute: support sphinx-toolbox collapse node label change
An update [1] has been made to sphinx-toolbox's CollapseNode. Adjusting the transmute logic to support the variant label approaches. [1]: sphinx-toolbox/sphinx-toolbox@ae0ae83 Signed-off-by: James Knight <[email protected]>
1 parent 13ea707 commit 355d2bb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

sphinxcontrib/confluencebuilder/transmute/ext_sphinx_toolbox.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,13 @@ def replace_sphinx_toolbox_nodes(builder, doctree):
8282
for node in findall(doctree, sphinx_toolbox_CollapseNode):
8383
new_node = confluence_expand(node.rawsource,
8484
*node.children, **node.attributes)
85-
new_node.attributes['title'] = node.label
85+
86+
if hasattr(node, 'label'):
87+
new_label = node.label
88+
else:
89+
new_label = node.get('label', '')
90+
91+
new_node.attributes['title'] = new_label
8692
node.replace_self(new_node)
8793

8894
if has_sphinx_toolbox_github_issues:

0 commit comments

Comments
 (0)