metonym / svelte-highlight

Syntax Highlighting for Svelte using highlight.js
https://svhe.onrender.com
MIT License
253 stars 13 forks source link

Bug: padding-bottom is 1em when line is not last #258

Closed pjebs closed 1 year ago

pjebs commented 1 year ago

@metonym You can see in the screenshot that line 890 has padding-bottom set to 1em despite not being the last line of code.

The solution is to remove @const from below lines: https://github.com/metonym/svelte-highlight/blob/master/src/LineNumbers.svelte#L86

It interferes with the reactivity of the code prop which could have varying numbers of lines.

image

metonym commented 1 year ago

Fixed in v7.1.2