Ruby Rails RHTML syntax highlighter
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Tue Feb 14 20:13:03 UTC 2006
Hi Anders
On Tuesday 14 February 2006 18:26, Anders Lund wrote:
> On Tuesday 14 February 2006 14:33, Richard Dale wrote:
> > Please find attached a syntax highlighting grammar for Ruby Rails *.rhtml
>
> Do you know how the php (html) highlight works?
>
> It is generated by a script that makes HTML include the php highlighter,
> recursively so that highlights used by HTML also gets the detection
> included.
>
> It is my plan to add code to the highlighting engine for Kate 3.0 (that
> will ship with KDE 4) that does this dynamically, allowing us to cover all
> sorts of multiformat texts (eperl, embperl, rhtml, asp, whatever)
>
> Just so you know.
I did find a perl script when I saw this in the php/html one, but I couldn't
quite see how it worked:
***** THIS FILE WAS GENERATED BY A SCRIPT - DO NOT EDIT *****
There didn't seem to be a way of specifiy the various rhmtl delimiters:
<% .. %>
<% .. -%>
% (ruby code until end of current line)
There can be a '%>' at the end of a ruby comment line where it has to pop two
contexts to get back to the html context it was in. So as long as it works at
least as well as the current highlighter please autogenerate it in the
future.
-- Richard
More information about the KDevelop-devel
mailing list