Open alshabalin opened 9 years ago
Suppose we have the following template:
%body - $options = [ 'One', 'Two', 'Three', 'Four', 'Five' ] - if (count($options)) %ul - foreach ($options as $item) %li= $item - else %div No options!
Now it generates well-indented PHP code like this:
<body> <?php $options = [ 'One', 'Two', 'Three', 'Four', 'Five' ]; ?> <?php if (count($options)) { ?> <ul> <?php foreach ($options as $item) { ?> <li><?php echo htmlspecialchars($item,ENT_QUOTES,'UTF-8'); ?></li> <?php } ?> </ul> <?php } else { ?> <div>No options!</div> <?php } ?> </body>
But in fact the output HTML code has some redundant indentation:
<body> <ul> <li>One</li> <li>Two</li> <li>Three</li> <li>Four</li> <li>Five</li> </ul> </body>
It would be nice to have something like this:
This HTML code is much more pretty :)
I have fixed this issue, may be this will be useful for someone.
Suppose we have the following template:
Now it generates well-indented PHP code like this:
But in fact the output HTML code has some redundant indentation:
It would be nice to have something like this:
This HTML code is much more pretty :)
I have fixed this issue, may be this will be useful for someone.