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 109461 - bad rhtml indenting
Summary: bad rhtml indenting
Status: RESOLVED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: RHTML (show other bugs)
Version: 6.x
Hardware: PC Windows Vista
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-12 03:32 UTC by jamespb
Modified: 2007-10-29 17:04 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jamespb 2007-07-12 03:32:28 UTC
Hit alt-shift-F:

<td class="<%= "foo_#{bar}" %>">
    <%= actual_case.status %>
    </td>

<td class="foo_bar">
    <%= actual_case.status %>
</td>

The first </td> is incorrectly indented.

Product Version: NetBeans Ruby IDE 070711 Java: 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 System: Windows Vista
version 6.0 running on x86; Cp1252; en_US (nbrubyide) Userdir: C:\Users\James\AppData\Roaming\.nbrubyide\dev
Comment 1 Torbjorn Norbye 2007-07-12 03:54:46 UTC
Indentation in RHTML isn't implemented yet (I believe it's currently only doing the HTML part?) but reassigning to Marek in case this scenario isn't covered by 
the new embedded-indentation work.
Comment 2 Torbjorn Norbye 2007-08-07 22:16:54 UTC
In the works; not checked in yet because it depends on some editor infrastructure changes first (to ensure that the HTML formatter doesn't stomp on the RUby 
formatted code.)
Comment 3 globetro 2007-08-11 20:05:10 UTC
Netbeans doesn't seem to honor the identation engine set for rhtml (or html in general).  It seems to always want to
default to 4 spaces for indents, no matter what is specified in the indentation engine.  

For example, if I set indents to two, it'll indent the new line (when you hit 'enter') to two spaces, but then the
subsequent line gets a few spaces added to it too.  Also, if you select all and hit alt-shift-f to auto-format the code,
it uses 4 spaces for indents instead of two.
Comment 4 Torbjorn Norbye 2007-10-29 17:04:12 UTC
There have been a lot of fixes in this area and in particular, your scenario now formats as it should be. If you see any
other irregularity here, please let me know.

globetro: It properly seems to use 2-space indents now. If you see any other problems please file a new issue with
specifics to reproduce.