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

[Bug] 2 snippets which make the file no more valid PHP.

Open Yivan opened this issue 5 years ago • 1 comments

Hello,

On the last prettier version at this time and last php plugin version, those 2 code snippets make the php file invalid after.

SNIPPET 1

Before:

<?=$this->input('before') ?><?=$this->numeric('value');?><?=$this->input('after') ?>

After:

<?=
      $this->input('before')
      $this->numeric('value')
      $this->input('after')
?>

SNIPPET 2

Before:

<?php /* Some text */ 
if ($this->context ==='cars' || ($this->context !=='cars' && $this->editmode)) : ?>

After:

 /* Some text */<?php
/* Some text */
?>if (
    $this->context === 'cars' ||
    ($this->context !== 'cars' && $this->editmode)
): ?>

Hope it help to achieve a stable version. Big thumbs up for this wonderfull plugin !

Yivan avatar Feb 15 '20 00:02 Yivan

Thanks for the bug report @Yivan :slightly_smiling_face:

czosel avatar Feb 15 '20 10:02 czosel