Skip to content

The deco role does not support the tilde modified domain reference #13528

Open
@dagardner-nv

Description

@dagardner-nv

Describe the bug

When using the :py:deco: role the ~ prefix doesn't shorten the title to the last component, and leaves the tilde character in the rendered html output.

ref:
https://www.sphinx-doc.org/en/master/usage/referencing.html#xref-modifiers
https://www.sphinx-doc.org/en/master/usage/domains/python.html#target-specification

How to Reproduce

test.rst:

Example
=======

 * deco role with tilde :py:deco:`~aiq.cli.register_workflow.register_embedder_client`
 * deco role without tilde :py:deco:`aiq.cli.register_workflow.register_embedder_client`
 * func role :py:func:`~aiq.cli.register_workflow.register_embedder_client`

Environment Information

Platform:              linux; (Linux-6.1.0-32-amd64-x86_64-with-glibc2.36)
Python version:        3.12.0 (main, Oct  3 2023, 01:27:23) [Clang 17.0.1 ])
Python implementation: CPython
Sphinx version:        8.2.3
Docutils version:      0.21.2
Jinja2 version:        3.1.6
Pygments version:      2.19.1

Sphinx extensions

extensions = [
    'autoapi.extension',
    'IPython.sphinxext.ipython_console_highlighting',
    'IPython.sphinxext.ipython_directive',
    'myst_parser',
    'nbsphinx',
    'sphinx_copybutton',
    'sphinx.ext.doctest',
    'sphinx.ext.graphviz',
    'sphinx.ext.intersphinx',
    "sphinxmermaid"
]

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions