Releases: metonym/svelte-highlight
Releases · metonym/svelte-highlight
v5.1.2
19 Oct 16:01
Compare
Sorry, something went wrong.
No results found
Fixes
move TypeScript definitions components to the src/
folder
v5.1.1
19 Oct 15:48
Compare
Sorry, something went wrong.
No results found
Fixes
emit TypeScript definitions for languages and styles to the src/
folder
v5.1.0
17 Oct 14:30
Compare
Sorry, something went wrong.
No results found
Features
upgrade highlight.js
to v11.3.0
v5.0.0
08 Oct 23:05
Compare
Sorry, something went wrong.
No results found
Breaking Changes
use .svelte.d.ts
extension for TypeScript definitions
v4.0.0
16 Sep 19:08
Compare
Sorry, something went wrong.
No results found
Breaking Changes
move .hljs
class from pre
to code
(ead430a , #173 contributed by @willster277)
change padding of pre.langtag::after
to 1em
(ead430a , #173 contributed by @willster277)
v3.4.0
12 Sep 22:35
Compare
Sorry, something went wrong.
No results found
Features
add data-language
attribute to pre
element to allow targeted styling (b3dbb26 , #171 contributed by @willster277)
add langtag
prop that displays the highlighted language if enabled (b3dbb26 , #171 contributed by @willster277)
Set langtag
to true
to display the highlighted language.
<script >
import { HighlightAuto } from " svelte-highlight" ;
$: code = ` .body { padding: 0; margin: 0; }` ;
</script >
<HighlightAuto {code } langtag =" {true }" />
Style the language tag by targeting the data-language
attribute:
pre .hljs [data-language = "css" ] {
--hljs-background : linear-gradient (135deg , # 2996cf, 80% , white);
--hljs-foreground : # fff ;
--hljs-radius : 8px ;
}
v3.3.0
01 Sep 16:17
Compare
Sorry, something went wrong.
No results found
v3.2.1
01 Sep 16:17
Compare
Sorry, something went wrong.
No results found
v3.2.0
02 Aug 13:23
Compare
Sorry, something went wrong.
No results found
v3.1.0
08 Jul 15:21
Compare
Sorry, something went wrong.
No results found