Skip to content

Instantly share code, notes, and snippets.

@vrinek
Created July 27, 2009 14:42
Show Gist options
  • Save vrinek/156416 to your computer and use it in GitHub Desktop.
Save vrinek/156416 to your computer and use it in GitHub Desktop.
<tr class="marked">
<td colspan="5"><pre><a name="line6"></a>6 def toc_for(article)</pre></td>
</tr>
<tr class="uncovered">
<td colspan="5"><pre><a name="line7"></a>7 '<ul id="toc_links">' + article.toc.collect{ |h5|</pre></td>
</tr>
<tr class="uncovered">
<td colspan="5"><pre><a name="line8"></a>8 '<li>' + link_to(h5[:title], url_for_article(article) + '?article_page=' + h5[:page].to_s + '#' + h5[:id]) + '</li>'</pre></td>
</tr>
<tr class="uncovered">
<td colspan="5"><pre><a name="line9"></a>9 }.join("\n") + '</ul>'</pre></td>
</tr>
<tr class="uncovered">
<td colspan="5"><pre><a name="line10"></a>10 end</pre></td>
</tr>
<tr class="uncovered">
<td colspan="5"><pre><a name="line11"></a>11 end</pre></td>
</tr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment