Wednesday Oct 06, 2010

Formatting PHP and HTML

I have made a few enhancements and fixes in the formatting area, where PHP and HTML is used in one file together. It's not ideal and probably there are many cases, when it doesn't work as you want. So if you find a case, when the formatter doesn't work correctly, please file a new bug in our Bugzilla.

Probably the most visible change is that the formatter in NetBeans 6.9 and NetBeans 6.9.1 tried to place the close PHP tag on the same column as open PHP tag is. Now the formatter treat the open and close PHP tags as html tags.

 The second improvement is that the formatter and indentation engine have now better support for alternative syntax.

Some times users wrote me that the formatter worked better in NetBeans 6.8. This is not true. There wasn't a formatter in NetBeans 6.8, there was only indenter. So it "just" moved the beginning of lines.

I don't claim that current formatter is perfect and that the formatter works perfectly. It's not easy task and there will be always cases, when it will no work perfectly. But you can help us to eliminate them.  

About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today