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 179241

Summary: source format inserts spurious spaces in erb
Product: ruby Reporter: fjan11 <fjan11>
Component: EditingAssignee: issues@ruby <issues>
Status: REOPENED ---    
Severity: normal    
Priority: P3    
Version: 6.x   
Hardware: Macintosh   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: java file that gets additional spaces when formatted

Description fjan11 2010-01-06 03:42:50 UTC
Each time Source -> Format is selected on an erb file several spurious spaces get inserted. For example in this erb snippet:

<p>
   This sentence gets indented correctly by source format
</p>
<% if true %>
  <p>
       This sentence only gets indented correctly the first time source format is selected
       This will shift on every subsequent invocation
  </p>
<% end %>
Comment 1 Erno Mononen 2010-04-13 12:31:23 UTC
Seems to be fixed in 6.9 dev builds, please reopen if you can still reproduce this with 6.9 Beta or the latest daily. Thanks.
Comment 2 fjan11 2010-04-15 09:18:35 UTC
I found what the problem is: This bug ONLY happens if in the following setting is NOT checked: Preferences => Editor => Formatting => Language: RHTML => Expand tabs to spaces

The default setting is that tabs are converted to spaces so not many people will run into this, so I am mainly putting this here for reference.
Comment 3 lolo_101 2011-01-09 18:07:12 UTC
Created attachment 104826 [details]
java file that gets additional spaces when formatted

Every time the source is formatted with Alt-Shift-F, a space is added line 34 just before the '{'.
Comment 4 lolo_101 2011-01-09 18:08:29 UTC
I also have the same issue with NB 7.0 beta on windows XP and windows 7, with a java file (see attachement).