Skip to content

role :manpage: with non-digit section renders incorrect url #9927

Open
@Un1Gfn

Description

@Un1Gfn

Describe the bug

In

:manpage:`name(N)`

if N is not a digit, it renders incorrectly.

How to Reproduce

conf.py

manpages_url = 'https://man.archlinux.org/man/{page}.{section}'

reST

:manpage:`termios.h(0p)`

renders

<a class="manpage reference external" href="https://man.archlinux.org/man/termios.h(0p).">termios.h(0p)</a>

where the url

https://man.archlinux.org/man/termios.h(0p).

is incorrect

Expected behavior

https://man.archlinux.org/man/termios.h.0p

Your project

https://github.com/Un1Gfn/sphinx.public

Screenshots

No response

OS

Linux 5.15.5-arch1-1 x86_64

Python version

Python 3.9.9

Sphinx version

4.3.1

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions