On Mar 22, 4:02 am, "chovy"
<ettin...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> <ul>
> <% for ... %>
> <li>..</li>
> <% end %>
> <li>..</li>
> <li>..</li>
> </ul>
>
> The above sample ends up giving me double spacing between the <li>
> elements.
>
> I was told that <% for -%> will remove them, but it is also adding
> more tabs in the loop...so my generated html looks like:
>
> <ul>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> </ul>
>
> I realize this is rather insigificant but my sources is more difficult
> to read when debugging if tabstop is not the same.
>
> What I want is:
> <ul>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> <li>...</li>
> </ul>
Update: I found this works, but would like to set this behavior as the
default if possible...
<%- for ... -%>
<li>..</li>
<%- end -%>
The "-" strips beg/end white space.although a link to documentation on
its usage would be good.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---