« Return to Thread: RHTML comments

RHTML comments

by Tor Norbye :: Rate this Message:

Reply to Author | View in Thread

We have actions in the IDE for commenting/uncommenting sections of  
code. It works for Ruby - just hit Ctrl-/ to toggle comments.

It doesn't work in RHTML however - as tracked by issue http://
ruby.netbeans.org/issues/show_bug.cgi?id=110505 .

I was going to fix this - but then realized I'm not sure how to fix  
it.  What's the best way of commenting out a line, repeatedly, in RHTML?

Just inserting <!--  and --> around each line won't work - Ruby code  
will still be executed.

I'm thinking of using <%# and %> around each line. There are some  
other alternatives, like inserting <% if false %>, <% end %> around  
the block of code, but this has some disadvantages - you don't get  
syntax highlighting feedback that the code is commented out (since  
it's "execution"-based commenting) - and it works differently than  
the "per-line-commenting" that is used for this in the IDE.

-- Tor

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


 « Return to Thread: RHTML comments