You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When prettier-php has a comment directly after <php, it reformats the comment on each successive run, resulting in strange behaviour. The most bizarre is copying the line on each successive run of prettier.
note: By stable, I mean the second time you run prettier, it doesn't change the files. If there's a better word for this, I'm happy to change my description.
This bug is captured in a comment on another issue. However, due to this bug breaking a core properties of prettier, stable transformations, I think it's worth its own issue.
When prettier-php has a comment directly after
<php
, it reformats the comment on each successive run, resulting in strange behaviour. The most bizarre is copying the line on each successive run of prettier.note: By stable, I mean the second time you run prettier, it doesn't change the files. If there's a better word for this, I'm happy to change my description.
This bug is captured in a comment on another issue. However, due to this bug breaking a core properties of prettier, stable transformations, I think it's worth its own issue.
similar bugs:
Prettier 3.5.3
PHP Plugin 0.22.4
Example 1
Input:
Output run 1:
Output run 2:
Output run 3: each successive run adds a new line with
// Footer
Example 2
Input:
Output run 1:
Output run 2:
Example 3
Input:
Output run 1:
Output run 2:
Output run 3:
cc: @movva-gpu
The text was updated successfully, but these errors were encountered: