plugin-php
plugin-php copied to clipboard
Invalid output caused by "inline" node before "leadingComments" node
@prettier/plugin-php v0.11.2 Playground link
Input: with space before the PHP starting tag
<?php // comment
echo the_content(); ?>
Output:
<?php // comment
// comment
?>echo the_content(); ?>
The extra PHP closing tag break the PHP code itself
Note: In case I remove the space before the PHP starting tag, the output is correct:
Input:
<?php // comment
echo the_content(); ?>
Output:
<?php // comment
echo the_content(); ?>
Yes, bug