Describe the bug
You can't combine ~ and ! in a cross-reference
How to Reproduce
Will output ~any.thing()
Will output thing(), the expected behavior but a warning is raised
Environment Information
Platform: linux; (Linux-6.18.35-1.qubes.fc41.x86_64-x86_64-with-glibc2.41)
Python version: 3.13.5 (main, Jun 13 2026, 14:18:01) [GCC 14.2.0])
Python implementation: CPython
Sphinx version: 9.1.0
Docutils version: 0.22.4
Jinja2 version: 3.1.6
Pygments version: 2.20.0
Sphinx extensions
Additional context
Describe the bug
You can't combine
~and!in a cross-referenceHow to Reproduce
Will output
~any.thing()Will output
thing(), the expected behavior but a warning is raisedEnvironment Information
Sphinx extensions
noneAdditional context