Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-5096

Wrong formatting after open tag in executable script

    XMLWordPrintableJSON

    Details

      Description

      PHP script can be made to be directly executable when first line contains string "#!" followed by path to PHP executable (also called shebang).

      #!/usr/bin/php
      <?php
      
      echo "Hello World!\n";
      

       
      In this case blank lines after PHP open tag are applied not from "After Open Tag" but from "After open tag in HTML".

      Steps to reproduce:

      1. Open Options and in Formatting > PHP > Blank Lines
      2. Set "After Open Tag" to 1
      3. Set "After Open Tag in HTML" to 3
      4. Create new file with content above
      5. Format file - there will be three blank lines after "<?php" and not one as expected

      Actual result:

      #!/usr/bin/php
      <?php
      
      
      
      echo "Hello World!\n";
      

      Expected result:

      #!/usr/bin/php
      <?php
      
      echo "Hello World!\n";
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Kacer Tomáš Procházka
                Reporter:
                Kacer Tomáš Procházka
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1.5h
                  1.5h