How do I not indent HTML that is surrounded by PHP?

I use a php framework in which all of the pages look like this:

<?php
// Startup code
?>
<!doctype html>
<html>
...
</html>
<?php
// Shutdown code
?>


My problem is that the auto format feature of PHPStorm always indents all of the html between the startup and shutdown code blocks, presumably because it thinks they are a parent tag. I've tried messing with the "Do not indent children of" setting in the html formatter (adding in "php", "?php", and "?php?"), but that had no effect. I don't see any settings that could control this in the php formatter options.

It's driving me crazy. Any ideas?

Please sign in to leave a comment.