<?php if (true): ?>
<div x-data='{
"going": "right!"
}'>
</div>
<?php endif; ?>
The above sort of thing can happen if you're using alpine.js, but there's not actually any JS context involved; it does the same for just plain attribute content:
<?php if (true): ?>
<div style='a
b
c'>
</div>
<?php endif; ?>
Not sure how the code is in general, but seems possibly worth running format twice in automated tests, to verify that the second time is a noop? Depending on how robust the test suite is, might catch other instances of the same thing. It might be unfortunate to do on the client end, but you could also use the same technique to catch (and possibly report) errors from the extension (and not continuously change files every save). I'd opt in :)