sphinx-doc / sphinx-doc/sphinx
ignore duplicated labels in autosectionlabel extension
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
When having duplicated section titles in the same file the autosectionlabel extension print a warning but adds the label anyway overriding the old one.
In this situation I think it would be better to simply not add labels for duplicated sections. In this way a user can define its own labels for that problematic sections avoiding inconsistencies.
This behaviour can be optionally enabled by a configuration option of the autosectionlabel extension.
If you want I can submit a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the autosectionlabel extension and the code that emits a warning for duplicated section titles. Review how extension configuration is defined and how its existing tests cover duplicate sections. Done means duplicated sections no longer override an existing label when the requested option is enabled, while the current behavior remains available otherwise.
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
- 35/100