[TxMt] <%- ERb tags question
devlist at samuraicoder.net
Sun Dec 16 18:44:58 UTC 2007
On Dec 17, 2007, at 1:50 AM, James Gray wrote:
> 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.
Thanks. Looks like that a book I'm reading only mentions "<% -%>".
Now I got the true meaning of the minus sign.
More information about the textmate