Skip to content

Commit 6e485be

Browse files
committed
DOC: fix :mpltype:color role
`inline.interpreted()` already returns a list of nodes. We mustn't wrap it in another list.
1 parent 810a43b commit 6e485be

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

doc/sphinxext/custom_roles.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,8 @@ def mpltype_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
7272
if mpltype not in type_to_link_target:
7373
raise ValueError(f"Unknown mpltype: {mpltype!r}")
7474

75-
ref_nodes, messages = inliner.interpreted(
75+
node_list, messages = inliner.interpreted(
7676
mpltype, f'{mpltype} <{type_to_link_target[mpltype]}>', 'ref', lineno)
77-
node_list = [ref_nodes]
7877
return node_list, messages
7978

8079

0 commit comments

Comments
 (0)