This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 240528

Summary: Code alignment mistake
Product: php Reporter: s4urp8n
Component: Formatting & IndentationAssignee: Ondrej Brejla <obrejla>
Status: NEW ---    
Severity: normal CC: rob006
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: screenshot of alighment mistake

Description s4urp8n 2014-01-16 07:48:58 UTC
Created attachment 144015 [details]
screenshot of alighment mistake

Code alignment breaks if you write dynamic JS into HTML script tag using PHP tags. 

USES AUTOMATIC FORMATING ALT+SHIFT+F

See attachment archive for example screenshot and PHP-code
Comment 1 mmolda 2014-01-27 16:24:23 UTC
PHP tags are formatted with no indentiation.

Example - before format:

<script>
    alert('start');
    <?php
    $a = 5;
    ?>
    alert('end');

</script>

After format:

<script>
    alert('start');
<?php
$a = 5;
?>
    alert('end');

</script>