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 - Erb incorrectly colors lines starting with %
Summary: Erb incorrectly colors lines starting with %
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: 2009-07-01 16:28 UTC by fjan11
Modified: 2011-01-28 20:13 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 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.