Changelog
October 22, 2025 ยท View on GitHub
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
7.9.0 - 2025-10-21
Features
- add
languageNamesprop toHighlightAutoto allow a subset of languages - update
languageNameinLangTagto useLanguageNameutility type - export
LanguageNameutility type
7.8.4 - 2025-08-31
Fixes
- export
LanguageTypeutility type
7.8.3 - 2025-04-01
Fixes
- remove
@ts-checkcomments
7.8.2 - 2024-12-27
Fixes
- update docs on
pnpmusage
7.8.1 - 2024-12-25
Fixes
- upgrade
highlight.jsto version 11.11.1
7.8.0 - 2024-12-15
Features
- upgrade
highlight.jsto version 11.11.0
Fixes
- optimize preprocessed CSS StyleSheets
7.7.0 - 2024-07-15
Features
- upgrade
highlight.jsto version 11.10.0
7.6.1 - 2024-05-15
Fixes
- avoid self-closing tag in
LineNumbersto address Svelte 5 warning
7.6.0 - 2024-02-05
Features
- add
--langtag-top,--langtag-rightstyle props
7.5.0 - 2024-02-01
Features
- add
--langtag-paddingstyle prop
7.4.8 - 2024-01-04
Fixes
- add missing
exportsto allow importing fromsvelte-highlight/stylesandsvelte-highlight/languages
7.4.7 - 2023-12-28
Fixes
- use
declare constforlanguagesandstylestype definitions
7.4.6 - 2023-12-16
Fixes
- fix
./*.sveltemapping; useimportspecifier instead ofsvelte
7.4.5 - 2023-12-16
Fixes
- map
./*.sveltefiles correctly inpackage.jsonexports
7.4.4 - 2023-12-16
Fixes
- add
typesto exports map inpackage.json - optimize generated CSS using
cssnano
7.4.3 - 2023-12-16
Fixes
- add
svelteentry point to exports map inpackage.jsonto address Vite development warning
7.4.2 - 2023-11-25
Fixes
- Re-publish package with provenance
7.4.1 - 2023-10-13
Fixes
- Re-publish package after correctly building it
7.4.0 - 2023-10-13
Features
- upgrade
highlight.jsto version 11.9.0
7.3.0 - 2023-05-13
Features
- upgrade
highlight.jsto version 11.8.0
7.2.1 - 2023-04-01
Fixes
- line numbers should not be covered by a solid fill, custom line background color
- line numbers column should not be covered by code if scrollable
7.2.0 - 2023-02-14
Features
- support highlighted lines in
LineNumbersthrough thehighlightedLinesprop
7.1.2 - 2023-01-01
Fixes
- correctly set top/bottom padding in
LineNumbersifcodeis updated
7.1.1 - 2022-12-31
Fixes
- republish package
7.1.0 - 2022-12-31
Features
- add
startingLineNumberprop toLineNumbers
7.0.1 - 2022-12-30
Fixes
- reset
tablestyles inLineNumbers
7.0.0 - 2022-12-30
Breaking Changes
- rename langtag style props
--hljs-background->--langtag-background--hljs-foreground->--langtag-color--hljs-radius->--langtag-border-radius
- mark
code,languageas required props
Features
- include inferred
languageinon:highlightevent detail inHighlightAuto - add
LineNumberscomponent to support rendering line numbers - upgrade
highlight.jsto version 11.7.0
Fixes
- use
HTMLAttributesfromsvelte/elementsto correctly type$$restProps
6.2.1 - 2022-08-07
Fixes
- generate types for
svelte-highlight/languages/*,svelte-highlight/styles/*
Documentation
- add dynamic import example
- document CDN styles usage
- use TypeScript in all example set-ups
- remove Snowpack example as it is no longer maintained
- update set-up instructions for SvelteKit/Vite
6.2.0 - 2022-07-13
Features
- upgrade
highlight.jsto version 11.6.0 (net +2 styles)
6.1.1 - 2022-07-02
Fixes
- remove
languageprop type fromHighlightAutoTypeScript definitions
6.1.1 - 2022-06-27
Refactor
- remove unnecessary
languagenull check when settingdata-languageattribute - reduce
.langtagCSS specificity
6.1.0 - 2022-06-10
Features
- port Svelte components to TypeScript
Documentation
- fix prop table types and default values
6.0.1 - 2022-03-26
Fixes
- update generated
SUPPORTED_LANGUAGES.mdandSUPPORTED_STYLES.md
6.0.0 - 2022-03-26
Breaking Changes
- use SvelteKit to package the library and auto-generate TypeScript definitions
- styles are moved from
src/stylestostyles - languages are moved from
src/languagestolanguages
- styles are moved from
5.3.2 - 2022-03-16
- specify in docs that Vite should optimize both "highlight.js" and "highlight.js/lib/core" if using SvelteKit or Vite
5.3.1 - 2022-03-16
- use default highlight.js library for
HighlightAuto
5.3.0 - 2022-03-12
- upgrade
highlight.jsto version 11.5.0 (net +1 language, +3 styles)
5.2.2 - 2022-02-25
- use default export from
highlight.js/lib/core.js
5.2.1 - 2022-02-11
- remove whitespace from
pretags because Svelte v3.46.4 now preservesprewhitespace
5.2.0 - 2022-01-06
- upgrade
highlight.jsto version 11.4.0 (net +1 style)
5.1.4 - 2021-12-18
- recommend installing
highlight.jsas a dependency for pnpm users
5.1.3 - 2021-11-13
- patch
highlight.jsto version 11.3.1
5.1.2 - 2021-10-19
Fixes
- move TypeScript definitions components to the
src/folder
5.1.1 - 2021-10-19
Fixes
- emit TypeScript definitions for languages and styles to the
src/folder
5.1.0 - 2021-10-17
Features
- upgrade
highlight.jsto v11.3.0
5.0.0 - 2021-10-08
Breaking Changes
- use
.svelte.d.tsextension for TypeScript definitions
4.0.0 - 2021-09-16
Breaking Changes
- move
.hljsclass frompreelement tocodeto align with the intended usage ofhighlight.js - change padding of
pre.langtag::afterto1emto prevent overpadding
3.4.0 - 2021-09-12
Features
- add
data-languageattribute topreelement to allow targeted styling - add
langtagprop that displays the highlighted language if enabled
3.3.0 - 2021-09-01
Features
- include named language export in
src/languages/*files
3.2.1 - 2021-09-01
Documentation
- update link to live demo
3.2.0 - 2021-08-02
Features
- upgrade
highlight.jsto v11.2.0
3.1.0 - 2021-07-08
Features
- upgrade
highlight.jsto v11.1.0
3.0.0 - 2021-05-30
Breaking Changes
github-giststyle removed fromhighlight.js
Features
- upgrade
highlight.jsto v11.0.0- +2 styles (
github-dark,github-dark-dimmed)
- +2 styles (
2.1.0 - 2021-05-21
Features
- upgrade
highlight.jsto v11.0.0-beta1- +1 language (
wren) - +1 style (
colors)
- +1 language (
2.0.0 - 2021-04-30
Breaking Changes
- upgrade
highlight.jsto the next major version (v11), which supports ESM- removed languages:
c-like,htmlbars,sql_more
- removed languages:
Features
- added languages:
nestedtext,wasm - 143 new styles
2.0.0-rc.1 - 2021-04-30
Fixes
- omit
.jsextension when importinghighlight.jslanguage - sort
types/styles/index.d.tsby name
2.0.0-rc.0 - 2021-04-30
Breaking Changes
- upgrade
highlight.jsto the next major version (v11), which supports ESM- removed languages:
c-like,htmlbars,sql_more
- removed languages:
Features
- added languages:
nestedtext,wasm - 143 new styles
1.0.1 - 2021-04-23
Fixes
- fix typos in
README.md
1.0.0 - 2021-04-23
Breaking Changes
- upgrade
highlight.jsto version 10.7 - remove all forwarded events from
Highlight,HighlightSvelte - remove legacy component; replace with
Highlight.svelteas the default export - remove Rollup from build process; only ship Svelte source code and languages/styles as ESM
- remove
highlightjs-sveltedependency; use XML/JavaScript/CSS as sublanguages
Features
- add
HighlightAutocomponent that auto highlights code - major bundle size improvements by using only the
corelibrary
Fixes
- correctly type languages/styles
Other
- drop Node.js v12 from Travis CI build config
Documentation
- use SvelteKit instead of Sapper for the documentation/live demo site
- provide correct NPM install command
0.7.1 - 2021-02-13
Fixes
- include
typesfolder in published files
0.7.0 - 2021-02-13
Features
- include highlighted markup in dispatched event detail
- add TypeScript definitions
Fixes
- mark CSS styles as side effects
0.6.2 - 2020-05-10
- Fix "language is undefined" error by falling back to unhighlighted code
0.6.1 - 2020-05-10
- Refactor build process to reduce bundled package size
0.6.0 - 2020-05-03
-
Export new
Highlight,HighlightSveltecomponents; maintain backwards compatibility withLegacycomponent -
Require svelte^3.20.x as a peer dependency due to usage of the
$$restPropsAPI -
Support Svelte syntax highlighting by wrapping
highlightjs-svelte -
Dispatch
highlightevent -
Forward the following events to the
preelement (on:click, on:mouseover, on:mouseenter, on:mouseleave, on:focus, on:blur)
0.5.0 - 2020-03-27
- Add editable support by exporting
contenteditable,spellcheckprops (#105)
0.4.1 - 2020-02-01
- Bump
highlight.jsversion from9.17.1to9.18.1
0.4.0 - 2019-12-18
0.3.5 - 2019-12-14
-
Use
gh-pagesto publish demo -
Move documentation for supported languages, styles to
docsfolder
0.3.4 - 2019-12-14
- Bump highlight.js from 9.17.0 to 9.17.1
0.3.3 - 2019-12-12
-
Use consistent terminology when documenting usage
-
Add version number to demo
0.3.2 - 2019-12-12
- Upgrade highlight.js to v9.17.0
0.3.1 - 2019-12-11
0.3.0 - 2019-11-18
- Add
codeprop for dynamically updating code
0.2.2 - 2019-11-17
- Add new live demo and remove storybook
0.2.1 - 2019-11-15
- Document supported languages, styles
0.2.0 - 2019-11-10
- Export highlight.js theme CSS files as JavaScript
0.1.1 - 2019-11-09
- Fix broken
svelteimport by publishingsrcfolder
0.1.0 - 2019-11-09
- Initial release