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 150996 - Formatter indents '%'
Summary: Formatter indents '%'
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: RHTML (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-22 11:56 UTC by fjan11
Modified: 2011-01-28 20:12 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 fjan11 2008-10-22 11:56:38 UTC
When choosing Source -> Format in an ERB file the formatter correctly indents the source and the '<%' and '<%=' but it also incorrectly indents '%' 
characters. The % is only a valid ERB escape character when it is the first character on the line, so after a source format the template is no longer valid.

Correct behaviour would be to either ignore lines that start with %, or even better would be to indent the space after the %.
Comment 1 fjan11 2008-10-22 12:01:46 UTC
I just noticed that this same bug exhibits in another way: when a line starts with whitespace and then a '%' the editor assumes the rest of the line is Ruby and 
colors it accordingly, even though it will be interpreted as HTML
Comment 2 Erno Mononen 2009-07-23 13:57:31 UTC
Thanks for the report, I hope I'll have time to fix this for 6.8.
Comment 3 Erno Mononen 2010-04-29 12:01:17 UTC
The issue is still there.