From: James Britt Date: 2005-12-10T12:06:00+09:00 Subject: Re: Customizing erb's recognized tags Larry White wrote: > Hi > > Does anyone know if it's possible to change the tags that erb > recognizes so that for instance, I can have it replace on #{} instead > of <%= %> ? > > If so, could you point me an example of how it's done? I wrote a hack that overrides IO.read. When IO grabs the file, it checks the file extension; if it's an erb template, it replaces (with some variants) markup with <% %> before passing along the content. It was a Good Enough sort of thing for the circumstances. class IO class <', '%>') s << "#{l}\n" } s end end James -- http://www.ruby-doc.org - Ruby Help & Documentation http://www.artima.com/rubycs/ - Ruby Code & Style: Writers wanted http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys http://www.30secondrule.com - Building Better Tools