We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b2ac35 commit 99a97d9Copy full SHA for 99a97d9
python/sphinx_rust/directives/_core.py
@@ -178,7 +178,7 @@ def create_object_xref(
178
"reftarget": full_name,
179
}
180
ref = addnodes.pending_xref(full_name, **options)
181
- name = full_name.split("::")[-1]
+ name = full_name.rsplit("::", maxsplit=1)[-1]
182
ref += nodes.literal(name, name)
183
184
return ref
@@ -207,7 +207,7 @@ def create_source_xref(
207
"classes": classes or [],
208
209
210
- text = full_name.split("::")[-1] if text is None else text
+ text = full_name.rsplit("::", maxsplit=1)[-1] if text is None else text
211
ref += nodes.literal(text, text)
212
213
0 commit comments