prettier / prettier/plugin-php
Output error with PHP comment and HTML output
Open
Nobody has claimed this yet.
bug
comments
- Dominant language
- PHP
- Stars
- 1.9k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
@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 } ?>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the discrepancy in the linked Playground using the reported PHP input and compare the formatter output with the issue's example. Trace the PHP/HTML formatting path involved in comments and closing PHP tags; done means the formatted output preserves the comment and produces the expected mixed PHP and HTML structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100