Rubymine div closing tag check logic failure when opening div tags are inside an IF statements

Not sure if this has been reported (kind o' busy right now - sorry).    Basically it appears that Rubymine sees that code below as two seperate DIV's opening.  Like, it needs some more closing tag logic to only count any opening tags in a view "IF" statement as 1 div opening tag.

Anyone know of a work-around?   The redline against the view for a missing close tag is driving me nuts.  :)

(results in an "ELEMENT DIV IS NOT CLOSED" red line)

<% if test = 'test'%>
<div id="some_id_for_special_css">
<% else %>
<div >
<% end %>
<% if x == 0  %>
#
<% if x == 1  %>
#
<% if x == 2 %>
#
<% end %>
</div>

Thanks!

2 comments
Comment actions Permalink

figured out a work-around (ugly and hard to read, but, it works and the red-line is gone)

<div

<% if test = 'test'%>

id="some_id_for_special_css"

<% else %>

<% end %>

>


<% if x == 0  %>
#
<% if x == 1  %>
#
<% if x == 2 %>
#
<% end %>
</div>

0
Comment actions Permalink

Hello Reno,

Thanks for the report, I've created an issue in our bugtracker: http://youtrack.jetbrains.net/issue/RUBY-8067
Feel free to vote, comment and get notified once this is fixed.

Regards,
Oleg

0

Please sign in to leave a comment.