Docs: C annotations extension produces invalid docutils tree
Open
@AA-Turner is already working on this.
Since Oct 12, 2025.
docs
type-bug
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
The function
add_annotationsinDoc/tools/extensions/c_annotations.pyinserts an emphasis node into a desc_content node. This produces an invalid document tree, since the desc_content node is a docutils Element and is not supposed to have children that are text or inline elements. To fix this, the emphasis node needs to be wrapped in a paragraph node.[…] the validity of the docutils tree is not checked by docutils or Sphinx.
This prevents to build the documentation to PDF with rinohtype.
Linked PRs
- gh-145838
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.
Assessment
This issue has not been assessed yet.