github lkrms/pretty-php v0.4.94

3 months ago

Added

  • Add support for VS Code region markers

    Comments like #region Twig aren't converted to // region Twig anymore; pretty-php recognises them as region markers and leaves them alone:

    Input:
    
    <?php
    return function (Foo $foo) {
      $foo->bar(Baz::class);
    
      #region Comment
    
      /* Other comments
       */
      //are still normalised
      #as usual
    };
    #endregion
    
    Output:
    
    <?php
    return function (Foo $foo) {
        $foo->bar(Baz::class);
    
        #region Comment
    
        /*
         * Other comments
         */
        // are still normalised
        // as usual
    };
    #endregion

Don't miss a new pretty-php release

NewReleases is sending notifications on new releases.