Skip to content

Docs: C annotations extension produces invalid docutils tree #140014

Description

@m-aciek

The function add_annotations in Doc/tools/extensions/c_annotations.py inserts 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

Activity

  1. self-assigned this
    on Oct 12, 2025
  2. added 2 commits that reference this issue on Mar 11, 2026
  3. khalidsaidi commented on Mar 25, 2026

    @khalidsaidi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

docsDocumentation in the Doc dirtype-bugAn unexpected behavior, bug, or error

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions