Issue with closing pre tag

Before this patch, the final line of code was ending up as </pre</pre> as not enough characters were getting stripped away before exploding into individual lines.

Brady, please check this over - if you check your own rendered gists against the develop branch, you should see that the last line of the table data cell for line_data end up as:

```html
</span></div></pre</pre></td>
```
which is clearly invalid markup.