#315 Support for RHTML files (Ruby HTML files)

open
nobody
None
5
2012-11-13
2006-02-16
Keith Gable
No

You support Ruby.
You support HTML.
You support ASP tags in HTML.

You have all of the prerequisites.

A RHTML file is simply a HTML file with Ruby code
embdedded in ASP tags.

<p>Whatever goes here</p>
<% ruby.statement %>
<%= myvar %>
<%# The above one returns the value of myvar %>
<%# These are comments %>

This should be /really/ simple to implement. All you'd
have to do would be to detect .rhtml/.rxml files and
instead of ASP code inside <% %>, highlight Ruby code.

And then understand that <%# text %> is a comment.

Discussion

  • Logged In: NO

    I second this request. Right now it's not possible to color code Ruby HTML files (.rhtml and the newer .html.erb). NP++ treats all code blocks in an HTML file beginning with <% as ASP code. If it could be changed to treat it as Ruby code it would be great.

     
  • shumezhurme
    shumezhurme
    2011-12-21

    I'm surprised at how little attention this issue gets. I suppose a lot of Ruby and ROR developers work in Linux or Mac for which there are.erb/.rhtml editors.

    Someone please look into this.

    I know there are some issues with the ASP tags which cause syntax highlighting to go berserk, but there must be a way to solve this problem. As the OP said, all the required pieces are in Npp already, just a matter of putting them together.