Code block beautify doesn't format mixed content in PHP field

Description:

When using a Cwicly Code block, if you beautify CSS or JS code, it works well.

If you do the same with PHP code containing HTML, CSS or JS, it does not beautify the code.

Step-by-step reproduction instructions:

  1. Add a Code block
  2. Add some mixed code in the PHP field
  3. Press beautify
  4. Note the code is not beautified as expected.

Environment info

  • WordPress version: 6.4.3
  • Cwicly Plugin version: 1.4.1

Hello @StrangeTech,

I’m not aware of any solution that currently allows to parse HTML and PHP at the same time, since one will consider the other invalid.
If you know of a formatter that can perform this task, please let me know.

As the PHP field specifically states support for PHP, I don’t believe this can be considered a bug.

Cheers,

Understood and agreed. Mixed content is not really required in most cases anyway and should ideally be separated. In this case it was just a messy API integration and we ended up separating it anyway. :+1: