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 167980

Summary: Erb incorrectly colors lines starting with %
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 2009-07-01 16:28:28 UTC
Lines in Erb templates that start with % are considered to be ruby until the next new line (with the appropriate Erb options). Netbeans does that correctly, 
except when the lines start with spaces before the %, then Netbeans still colors them as ruby code even though the are not. For example:

% begin # this is ruby
  % this is not ruby
% end 

will colorize "this is not ruby" as ruby code.
On a related note: the Source -> Format command inserts spaces before the % in Erb templates making them malfunction
Comment 1 Erno Mononen 2009-07-02 12:36:05 UTC
Reproduced, targetting 6.8 - thanks for the report.
Comment 2 Erno Mononen 2010-04-20 12:03:48 UTC
Still there.