-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUGFIX] TS copy operator handles existing reference
This implements a rather unexpected detail when combining reference "=<" and copy "<" operator from old TypoScript parser. Copy operator: lib.source1 = TEXT lib.source1.value = source1Value lib.source2.otherValue = source2OtherValue tt_content.target < lib.source1 tt_content.target < lib.source2 Result: tt_content.target = TEXT tt_content.target.otherValue = source2OtherValue The tt_content.target existing value from lib.source1 is kept, but children are reset - lib.source1.value is not within tt_content.target anymore. Now reference first, then copy: lib.source1 = TEXT lib.source1.value = source1Value lib.source2.otherValue = source2OtherValue tt_content.target =< lib.source1 tt_content.target < lib.source2 Old parser after resolving reference in FE: tt_content.target = TEXT tt_content.target.value = source1Value tt_content.target.otherValue = source2OtherValue New parser after resolving reference in FE: tt_content.target = TEXT tt_content.target.otherValue = source2OtherValue The old parser keeps existing references when the copy operator does not reset the value to something else. The patch adapts the new parser to behave identical and refactors the AST copy method to better documented, more easy and eventually also quicker code. Resolves: #100115 Releases: main, 12.4 Change-Id: Ia03cefd6e550833bdc9120a179881d04bf70d117 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/80461 Reviewed-by: Tomek Wolda?ski <[email protected]> Tested-by: Christian Kuhn <[email protected]> Reviewed-by: Christian Kuhn <[email protected]> Reviewed-by: Stefan B�rk <[email protected]> Tested-by: Tomek Wolda?ski <[email protected]> Tested-by: core-ci <[email protected]>
- Loading branch information
1 parent
43d92d7
commit 758d744
Showing
4 changed files
with
148 additions
and
40 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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