wcoder / highlightjs-line-numbers.js

Line numbering plugin for Highlight.js
https://wcoder.github.io/highlightjs-line-numbers.js/
MIT License
548 stars 126 forks source link

Fix empty line problem #24

Closed pnowy closed 6 years ago

pnowy commented 6 years ago

I've noticed sometimes there is a problem with additional empty line (which doesn't exist on the source code). Example from Jekyll where I use highligth.js with line-numbers: screen shot 2017-12-17 at 12 31 08

This PR fix the problem.

wcoder commented 6 years ago

Hi @pnowy, thanks for the contribution!

But it is common behavior of highlight.js

code
</code>
</pre>

For fix, use that:

code</code></pre>

So I think this functionality not need.

pnowy commented 6 years ago

Well - this is sometimes not possible (with pages the highlighjs is enabled and you want to enable the line numbers too) so optional check in my option it is a good think ...

Anyway - usefult plugin, I could always make a fork 😄