Hi! Love this project, thanks so much. If this is the wrong place to submit this issue let me know.
I noticed a very specific and weird issue with the prettier plugin—I have some markup that gets formatted and then indented further and further on each subsequent format. I've simplified the markup a lot here because it still reproduces with this example, but I can share the original too if that's helpful.
It seems to be related to the fact that the PHP expression starts on the same line as the attribute itself, moving it onto its own lines seems to fix this (although the PHP expression itself isn't formatted and there are still some weird indentation edge cases). So this is my workaround:
I'm totally fine with that, just thought it might be helpful to report anyway. If the easiest solution is just to force long expressions like that onto their own lines like in my workaround, that would be great imo.
Hi! Love this project, thanks so much. If this is the wrong place to submit this issue let me know.
I noticed a very specific and weird issue with the prettier plugin—I have some markup that gets formatted and then indented further and further on each subsequent format. I've simplified the markup a lot here because it still reproduces with this example, but I can share the original too if that's helpful.
Source:
Formatted:
Everything inside that inner
array_merge()
gets indented again every time I save, so after a few other changes to the file it looks like this:It seems to be related to the fact that the PHP expression starts on the same line as the attribute itself, moving it onto its own lines seems to fix this (although the PHP expression itself isn't formatted and there are still some weird indentation edge cases). So this is my workaround:
I'm totally fine with that, just thought it might be helpful to report anyway. If the easiest solution is just to force long expressions like that onto their own lines like in my workaround, that would be great imo.