sphinx-doc / sphinx-doc/sphinx

Support using definition-list text for reference captions

Open
#9,536 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

markup 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.

When adding references to a definition list, unlike titles there is no support for using the text from the definition list, so an explicit caption is always needed.

Describe the solution you'd like

Support for extraction definition list text.

.. _some-definition:

Some Definition
   Descriptive definition text.

Elsewhere in the document:

Link to :ref:`some-definition` without having to include a caption.

Currently this is needed.

Link to :ref:`Some Definition <some-definition>` with explicit caption.

Additional context

This is for maintaining the Blender manual https://docs.blender.org/manual/en/dev/

We use definition lists quite a lot, not being able to easily link to them is a drawback.

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

No file or test is named in the issue. Start by locating Sphinx's definition-list caption extraction and reference-resolution tests, then add coverage for the provided definition-list example; it is done when :ref:some-definition resolves to the definition-list text without an explicit caption.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.