Closed HitmanInWis closed 4 months ago
Hi Brett, This one is problematic to change. Deleting junk attributes is done with IntelliJ Platform API, and it formats the surroundings according to the project XML formatter configuration: Settings | Editor | Code Style | XML | Tabs and Indents | Continuation indent.
I think it is uncommon to use inconsistent formatting for files of the same type across the project. I suggest changing the mentioned formatter option to 4 and using it consistently in all files. Another option is to select the Reformat content files option you mentioned.
Interesting - this probably means that it only happens if the item removed is the first attribute of the XML element (making the next item now the first element).
I'm trying to avoid the "reformat content files" option b/c it means that everyone on the project has to be using IntelliJ to have XML format the exact same, which the FE Devs often do not.
That said, I see little harm in making the continuation indent for XML files 4 instead of 8, and it does indeed avoid the issue.
Well actually, the functionality seems to be inconsistent...when I pull a full folder from CRX I'm still seeing this strange indent on some files, but then if I sync that file again it goes away. Almost like there's some sort of race condition going on.
And now it seems fine - I'll report back if I see the issue any more, but for now the workaround (making the continuation indent for XML files 4 instead of 8) is working for me.
Well actually, the functionality seems to be inconsistent...when I pull a full folder from CRX I'm still seeing this strange indent on some files, but then if I sync that file again it goes away. Almost like there's some sort of race condition going on.
Now I'm worried. I'll monitor it.
after another month or so of working, I've not seen any issue with the workaround @karollewandowski . If there's no way to really solve this issue effectively w/o the user changing their IDE settings (i.e. the workaround) I'm cool closing out this item as "wont fix".
Thank you for the update. Unfortunately, I don't see any good option for fixing it in the plugin. I'm closing the issue then.
Thank you again for your time.
I am configured to NOT reformat files after Content Sync, but I AM configured to clean up invalid fields. I believe the clean up function is what's bugged to leave invalid indentation.
An example is as follows:
becomes