Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:rfc: should format links to sections #7027

Open
verhovsky opened this issue Jan 16, 2020 · 3 comments · May be fixed by #11809
Open

:rfc: should format links to sections #7027

verhovsky opened this issue Jan 16, 2020 · 3 comments · May be fixed by #11809
Labels
type:enhancement enhance or introduce a new feature

Comments

@verhovsky
Copy link

When you do

:rfc:`7231#section-6.6.1`

it's rendered like this:

RFC 7231#section-6.6.1

Instead, it should figure out that it's a section link and rendered it as something nicer:

RFC 7231, Section 6.6.1

@verhovsky verhovsky added the type:enhancement enhance or introduce a new feature label Jan 16, 2020
@AA-Turner AA-Turner added this to the some future version milestone Sep 29, 2022
@davidfstr
Copy link

davidfstr commented Apr 30, 2023

An example from an upcoming Python documentation change where improved "RFC section link rendering" would be nice: python/cpython#102328 (comment)

In that issue I suggest that

:rfc:`2616#section-5.1.2`

be formatted like "RFC 2616 §5.1.2"

@davidfstr
Copy link

It is possible to workaround the section formatting issue by providing the exact text of the link explicitly:

:rfc:`RFC 2616 §5.1.2 <2616#section-5.1.2>`

jstasiak added a commit to jstasiak/sphinx that referenced this issue Dec 22, 2023
Previously if we wrote

    :rfc:`1234#section-2`

links would be formatted like

    RFC 1234#section-2

which isn't quite nice. After this patch:

    RFC 1234 Section 2

which looks and reads better.

Resolves: sphinx-doc#7027
@jstasiak jstasiak linked a pull request Dec 22, 2023 that will close this issue
@jstasiak
Copy link

See #11809 which implements this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants