P
Patrick May
Hello,
One of the nice things about php is that the '<?>' keys are close to
each other. One of the annoying things about asp and jsp is that '<>'
use one hand, and '%' uses another.
Attached is a patch to erb.rb that allows ?'s as well as %'s in erb
templates:
<% puts "this works" %>
<? puts "as does this" ?>
Let me know if there is anything I can do to make this a better patch.
If you want to play with this, you can grab the patched version of erb
from narf:
http://svn.narf-lib.org/svn/narf/trunk/lib/web/phprb.rb
I renamed the constant to PHPRB, so as not to collide with the standard
lib.
Cheers,
Patrick
One of the nice things about php is that the '<?>' keys are close to
each other. One of the annoying things about asp and jsp is that '<>'
use one hand, and '%' uses another.
Attached is a patch to erb.rb that allows ?'s as well as %'s in erb
templates:
<% puts "this works" %>
<? puts "as does this" ?>
Let me know if there is anything I can do to make this a better patch.
If you want to play with this, you can grab the patched version of erb
from narf:
http://svn.narf-lib.org/svn/narf/trunk/lib/web/phprb.rb
I renamed the constant to PHPRB, so as not to collide with the standard
lib.
Cheers,
Patrick