andreaswolf / fractor

Generic File Read-Analyze-Change Tool
MIT License
31 stars 0 forks source link

TypoScript rule changes `[end]` to `[global]` #200

Closed simonschaufi closed 2 weeks ago

simonschaufi commented 2 months ago

this should not happen:

 [siteLanguage('languageId') == 1]
-       page.jsInline.5.value = var language = 'en';
-[end]
-
+page.jsInline.5.value = var language = 'en';
+[global]
andreaswolf commented 2 months ago

Not sure why this happens. This is probably a thing that the TS pretty printer does, but in general the statements like [end] should be kept.

simonschaufi commented 1 month ago

This also occurs in TYPO3 Rector 1.0. Seams like a bug in the third party lib.

simonschaufi commented 2 weeks ago

This is a bug in the TS parser and printer from Helmich and can't be fixed on our side.