metonym / svelte-highlight

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

Fix self-closing div tags #341

Closed mhkeller closed 3 months ago

mhkeller commented 3 months ago

Svelte 5 throws a warning if you use self-closing div tags:

node_modules/svelte-highlight/LineNumbers.svelte:48:14 Self-closing HTML tags for non-void elements are ambiguous — use `<div ...></div>` rather than `<div ... />`
node_modules/svelte-highlight/LineNumbers.svelte:57:14 Self-closing HTML tags for non-void elements are ambiguous — use `<div ...></div>` rather than `<div ... />

It would help cut down on warning messages I'm getting (and other folks will get in the future) by adding a </div> where needed.

metonym commented 3 months ago

Thank you for flagging. I will take a look.

metonym commented 3 months ago

Fixed in v7.6.1

mhkeller commented 3 months ago

Thanks for putting this in so quickly!