plugin-php icon indicating copy to clipboard operation
plugin-php copied to clipboard

Output error with PHP comment and HTML output

Open sgarrity opened this issue 4 years ago • 2 comments

@prettier/plugin-php v0.16.3 Playground link

Input:

<?php
if ($foo) {
	// Example comment
	?>
		<div></div>
	<?php
} ?>

Output:

<?php
if ($foo) {<?php
    // Example comment
    ?>
		<div></div>
	<?php } ?>

sgarrity avatar May 26 '21 22:05 sgarrity

Any updates for these issue ? this is crucial.

andriamirul avatar May 17 '22 04:05 andriamirul

Unfortunately not. This is why the README states

We're considering the plugin to be stable when pure PHP files are formatted. Formatting of files that contain mixed PHP and HTML is still considered unstable - please see open issues with the tag "inline" for details.

Any help on this topic is much appreciated - it is probably the most challenging issue of this project, though.

czosel avatar May 17 '22 05:05 czosel