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

Summary: Formatter indents '%'
Product: ruby Reporter: fjan11 <fjan11>
Component: RHTMLAssignee: issues@ruby <issues>
Status: NEW ---    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Macintosh   
OS: All   
Issue Type: DEFECT Exception Reporter:

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.