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.
The compiler builds its shadow tree from
getChildren()only.DefinitionListItemNodekeeps its term and classifiers in properties oftheir own, outside its children. A
NodeTransformertherefore neversees 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:
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
DefinitionListItemNodeand walks the term and classifiers itself. Eachtransformer that works on inline nodes has to do the same.
Possible fix: let
TreeNodeinclude the term and classifiers of aDefinitionListItemNodewhen it builds the shadow tree, or make themchildren of the item.