The formatting of sequential echo short tags is broken
@prettier/plugin-php v0.14.3 Playground link
Input:
<?php
$a = 'a';
$b = 'b';
?>
<?= $a ?><?= $b ?>
Output:
<?php
$a = 'a';
$b = 'b';
?>
<?=
$a
$b
?>
Oh, this seems to happen without using a short tag.
@prettier/plugin-php v0.14.3 Playground link
Input:
<?php
$a = 'a';
$b = 'b';
?>
<?php echo $a; ?><?php echo $b; ?>
Output:
<?php
$a = 'a';
$b = 'b';
?>
<?php
echo $a;
echo $b;
?>
yes, buggy :disappointed:
/cc @czosel Do you have ideas how we can fix inline printing, it is main painful right now
@evilebottnawi I'm not sure, I think the closest we got to a solution was here: https://github.com/glayzzle/php-parser/issues/170
Maybe I can find some time in the near future and try to solve this old and annoying problem.
Would be amazing if we could solve it - then we could release a true v1.0.0 :wink: Let me know when you start your attempt, I'll do my best to help :slightly_smiling_face: