Skip to content

Node transformers do not visit inline nodes in definition-list terms #1425

Description

@linawolf

The compiler builds its shadow tree from getChildren() only.
DefinitionListItemNode keeps its term and classifiers in properties of
their own, outside its children. A NodeTransformer therefore never
sees an inline node inside a term or a classifier.

A theme that completes inline nodes in a transformer gets different
output for the same role in a term and in running text:

:custom-role:`value`
    The definition.

A paragraph with :custom-role:`value`.

The role in the paragraph is transformed. The role in the term is
rendered exactly as the parser created it.

We worked around this in the TYPO3 theme: our transformer also supports
DefinitionListItemNode and walks the term and classifiers itself. Each
transformer that works on inline nodes has to do the same.

Possible fix: let TreeNode include the term and classifiers of a
DefinitionListItemNode when it builds the shadow tree, or make them
children of the item.

Activity

  1. added 2 commits that reference this issue on Oct 10, 2026
    2fe982a
    3d20e12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions