[Geany] Ruby/Rails - strange syntax highlighting problem, help !

Nathan Broadbent nathan.f77 at xxxxx
Sat Jan 21 02:15:14 UTC 2012


> > Have you tried setting the filetype to HTML?  I'm not sure it highlights
> > embedded Ruby code, but it should highlight the HTML correctly.
>
> Ruby does not support embedding HTML nor HTML support embedded ruby AFAICT.


Ruby on Rails views are HTML with embedded Ruby (ERb), with an
extension of ".html.erb".
The HTML lexer currently supports highlighting for JS, PHP, Python,
ASP, but not Ruby. So this support will need to be added if you want
ERb highlighting within HTML.


Cheers
Nathan

P.S. I was previously thinking about writing a Haml lexer, but I've
given up on that idea. Fixing the Ruby lexer so that it works with
Haml was good enough.



More information about the Users mailing list