[TxMt] <%- ERb tags question

James Gray james at grayproductions.net
Sun Dec 16 16:50:13 UTC 2007


On Dec 16, 2007, at 5:02 AM, Takaaki Kato wrote:

> I understand that "<%  -%>" doesn't make a new line in output.
> But what's "<%-  -%>"?

It trims space before, like an indent, and after the inserted content.

> Would it better to use <%- ? What's the best practice?

Well, it would be better if you want to trim whitespace on both sides  
and worse if you do not.

> Does anybody avoid the start tag and tweak "Toggle ERb Tags" command?

I don't know if they do, but you certainly can.  That script is pretty  
simple and shouldn't be too hard to understand.  Check it out.

James Edward Gray II



More information about the textmate mailing list