Trimming whitespace in my view template

    <% for ... %>
  • ..
  • <% end %>
  • ..
  • ..

The above sample ends up giving me double spacing between the


  • 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:

    • ...
    • ...
    • ...
    • ...
    • ...

    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:

    • ...
    • ...
    • ...
    • ...
    • ...
  • On Mar 22, 4:02 am, “chovy” [email protected] wrote:

    Update: I found this works, but would like to set this behavior as the
    default if possible…

    <%- for … -%>

  • ..
  • <%- end -%>

    The “-” strips beg/end white space.although a link to documentation on
    its usage would be good.