tack2us/app/views/pastes/show.html.erb
Andrew Tomaka 6933084926 Add line numbers
Line numbers are not supported by highlight.js.  This is hacked in through
JavaScript.  At page load, the number of new line characters are counted in the
code element.  Then, JavaScript loops through and adds a number and line break
to an empty div that is floated left.  This gives the appearence of line
numbers.
2014-03-09 15:25:15 -04:00

4 lines
134 B
Text

<div class="paste">
<div class="line-numbers"></div>
<div class="code"><pre><code><%= @paste.content %></code></pre></div>
</div>