bradyvercher / gistpress

WordPress plugin to add Gist oEmbed and shortcode support with caching.
GNU General Public License v2.0
143 stars 28 forks source link

Issue with closing pre tag #29

Closed GaryJones closed 11 years ago

GaryJones commented 11 years ago

Before this patch, the final line of code was ending up as </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:

</span></div></pre</pre></td>

which is clearly invalid markup.

bradyvercher commented 11 years ago

Nice catch. Looks like I was attempting to remove the closing tag using the original string length without accounting for the first tag already being stripped.

GaryJones commented 11 years ago

Ah, that's it. I couldn't workout where exactly the discrepancy was coming from.