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 189170 - ERB editor does not colorize the code correctly
Summary: ERB editor does not colorize the code correctly
Status: NEW
Alias: None
Product: ruby
Classification: Unclassified
Component: Editing (show other bugs)
Version: 7.0
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: issues@ruby
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-03 15:46 UTC by tkrd_oiax
Modified: 2011-01-28 20:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Attachment 1 (19.09 KB, image/png)
2010-08-03 15:46 UTC, tkrd_oiax
Details
Attachment 2 (20.10 KB, image/png)
2010-08-03 15:47 UTC, tkrd_oiax
Details
Attachment 3 (19.15 KB, image/png)
2010-08-03 15:47 UTC, tkrd_oiax
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tkrd_oiax 2010-08-03 15:46:43 UTC
Created attachment 101170 [details]
Attachment 1 [details]

1. Create a new ERB file with following content:

<%= f.fields_for :events do |ef| %>
<%= ef.text_field :name %>
<% end %>

Then the editor shows 'ef' of the line 2 in bold font and highlights ':name'  incorrectly. See the attachment 1 [details].

2. Edit the file above as following:

<%= f.fields_for :events do |ef| %>
<% if ef.object.new_record? %>
<%= ef.text_field :name %>
<% end %>
<% end %>

Then the editor highlights 'new_record?', but should not. See the attachment 2 [details].

3. Delete the line 2 and 4.

Then the colorization gets into a mess. See the attachment 3 [details].
Comment 1 tkrd_oiax 2010-08-03 15:47:21 UTC
Created attachment 101171 [details]
Attachment 2 [details]
Comment 2 tkrd_oiax 2010-08-03 15:47:41 UTC
Created attachment 101172 [details]
Attachment 3 [details]
Comment 3 tkrd_oiax 2010-08-03 15:54:34 UTC
My environment is ...

Product Version: NetBeans IDE Dev (Build 201008030001)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01
System: Linux version 2.6.31-22-generic running on amd64; UTF-8; ja_JP (nb)
Ruby: Ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]