sphinx-doc / sphinx-doc/sphinx

Rename "{name}" placeholder in numref role to "{title}"

Open
#8,259 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:enhancement
Dominant language
Python
Stars
8k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

Is your feature request related to a problem? Please describe.
According to numref docs:

As placeholders, %s and {number} get replaced by the figure number and {name} by the figure caption.

Given that name is used as an option to reference a figure directive (more typically thought of as a label), I think it's confusing to also use {name} as a placeholder.

Describe the solution you'd like
I would like to suggest that the {name} placeholder be replaced with {title}.

Describe alternatives you've considered
While {caption} would seem more appropriate for the figure directive, since users have the option to create new nodes utilizing enumerable_node, I find {title} to better generalize the role of the placeholder.

Additional context
n/a

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Search the repository for the numref role and its {name} placeholder, then inspect the related documentation and tests. The work is complete when the placeholder is consistently represented as {title} and the relevant documentation and tests reflect the new wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.