title: How can I stop printing a delimiter when the content starts a new line?
body: <p>I'm printing a long horizontal list, which starts a new line when it reaches the end of its div, and objects are seperated by a comma:</p>
  
  <pre><code>&lt;% Page.all.each_with_index do |p| %&gt;
    &lt;%= p.name %&gt;
    &lt;% if index + 1 &lt; Page.count %&gt;
      &amp;nbsp-&amp;nsbp
    &lt;% end %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>Right now, it prints like this if <code>Page.count == 18</code>:</p>
  
  <pre><code>page - page - page - page - page - page -
  page - page - page - page - page - page -
  page - page - page - page - page - page
  </code></pre>
  
  <p>so there is an ugly delimiter at the end of all but the last lines. Is there a way to prevent the delimiter from being printed if the end of the div is reached, so it would print like this?</p>
  
  <pre><code>page - page - page - page - page - page
  page - page - page - page - page - page
  page - page - page - page - page - page
  </code></pre>