Repository navigation
Conversation
A role or a substitution in a definition-list term is rendered exactly as the parser created it, while the same role in a paragraph is transformed. The compiler builds its shadow tree from getChildren() only, and DefinitionListItemNode keeps its term and classifiers in properties of their own. Each transformer that works on inline nodes has to walk them itself, as the TYPO3 theme does. The term is not the only such node. Code and menu captions, admonition and sidebar titles, the type, default and options of a confval, the argument of a general directive, the cells of a table, the image and caption of a figure, the target of an image and the parts of a bootstrap card or accordion item are kept the same way, and were just as invisible. A substitution in a table cell, for example, was rendered as "|known|". Such nodes now implement HasAttachedNodes and name the nodes they keep beside their children. The shadow tree visits attached nodes before the children. A change inside an attached node is made in the attached node itself, as its parent keeps it in a readonly property and cannot take a copy. The attached node itself cannot be replaced or removed. Admonitions, sidebars, confvals and cards are built by DirectiveProcessPass at priority 100, after most built-in transformers, so only transformers that run later reach their attached nodes. Resolves #1425 Signed-off-by: linawolf Assisted-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
linawolf
force-pushed
the
task/definition-list-term-transformers
branch
from
October 10, 2026 10:38
7660c69 to
2fe982a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[BUGFIX] Let node transformers visit nodes kept outside the children
A role or a substitution in a definition-list term is rendered exactly
as the parser created it, while the same role in a paragraph is
transformed. The compiler builds its shadow tree from getChildren()
only, and DefinitionListItemNode keeps its term and classifiers in
properties of their own. Each transformer that works on inline nodes
has to walk them itself, as the TYPO3 theme does.
The term is not the only such node. Code and menu captions, admonition
and sidebar titles, the type, default and options of a confval, the
argument of a general directive, the cells of a table, the image and
caption of a figure, the target of an image and the parts of a
bootstrap card or accordion item are kept the same way, and were just
as invisible. A substitution in a table cell, for example, was
rendered as "|known|".
Such nodes now implement HasAttachedNodes and name the nodes they keep
beside their children. The shadow tree visits attached nodes before
the children. A change inside an attached node is made in the attached
node itself, as its parent keeps it in a readonly property and cannot
take a copy. The attached node itself cannot be replaced or removed.
Admonitions, sidebars, confvals and cards are built by
DirectiveProcessPass at priority 100, after most built-in transformers,
so only transformers that run later reach their attached nodes.
Resolves #1425
Signed-off-by: linawolf
Assisted-By: Claude Opus 5.5 (1M context) noreply@anthropic.com