Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue in conditions followed by comments #2380

Open
kotmatpockuh opened this issue Jul 15, 2024 · 0 comments
Open

Issue in conditions followed by comments #2380

kotmatpockuh opened this issue Jul 15, 2024 · 0 comments

Comments

@kotmatpockuh
Copy link

I have such code:

<p>
<?php
    if ($article['shop']['id'] === 10) { // TestShop
?>
        <img alt="" src="test.png">
<?php
    }
    $this->load();
?>
</p>

and it's formatted to:

<p>
<?php
if ($article["shop"]["id"] === 10) {<?php
    // TestShop
    ?>
        <img alt="" src="test.png">
<?php }
$this->load();
?>
</p>

so - an invalid <?php is added

See https://loilo.github.io/prettier-php-playground/#N4IgDgTgpgLjCWUIHkwIPYDsDOIBcok8mMA6vACYwAW+AHAAwA0IMAhgEblW14AsLAK7YoAFU648AMzYAbES2zEA5rKgBFQehhR8M+VBZhqYAGpIlWfCADsAOj4gWMCG3iyVAYXQBbH2wAFAAkA-BdBQxAOVwBjKABlGABPNWswJABaGNwWaABHQXhoANdlfz05BRBiEQgYErYytgqDAF8WKAp4GHQUNHgsSVA2bBgWkXbqzDBBMbwQAB4wAD4AHUwFgH5jMHWAAgO9+Ck9gAoAEjY6+Bi1AG0AcmxqdDAHgF1Hyg+9gF5-vYARgYAEo9sA9gB6SF7URQUbxF67TCbNaYQ4YvYLeA+ZR7OQwX6rEDEvbYCAxImseEwOxgTDKYlorY7faHVpsg7nGjwbAZZaydBsCinEEAbnWqPWC0hKxArSAA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant