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.8.2 - 2024-12-27
Fixes
- update docs on
pnpm
usage
7.8.1 - 2024-12-25
Fixes
- upgrade
highlight.js
to version 11.11.1
7.8.0 - 2024-12-15
Features
- upgrade
highlight.js
to version 11.11.0
Fixes
- optimize preprocessed CSS StyleSheets
7.7.0 - 2024-07-15
Features
- upgrade
highlight.js
to version 11.10.0
7.6.1 - 2024-05-15
Fixes
- avoid self-closing tag in
LineNumbers
to address Svelte 5 warning
7.6.0 - 2024-02-05
Features
- add
--langtag-top
,--langtag-right
style props
7.5.0 - 2024-02-01
Features
- add
--langtag-padding
style prop
7.4.8 - 2024-01-04
Fixes
- add missing
exports
to allow importing fromsvelte-highlight/styles
andsvelte-highlight/languages
7.4.7 - 2023-12-28
Fixes
- use
declare const
forlanguages
andstyles
type definitions
7.4.6 - 2023-12-16
Fixes
- fix
./*.svelte
mapping; useimport
specifier instead ofsvelte
7.4.5 - 2023-12-16
Fixes
- map
./*.svelte
files correctly inpackage.json
exports
7.4.4 - 2023-12-16
Fixes
- add
types
to exports map inpackage.json
- optimize generated CSS using
cssnano
7.4.3 - 2023-12-16
Fixes
- add
svelte
entry point to exports map inpackage.json
to 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.js
to version 11.9.0
7.3.0 - 2023-05-13
Features
- upgrade
highlight.js
to 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
LineNumbers
through thehighlightedLines
prop
7.1.2 - 2023-01-01
Fixes
- correctly set top/bottom padding in
LineNumbers
ifcode
is updated
7.1.1 - 2022-12-31
Fixes
- republish package
7.1.0 - 2022-12-31
Features
- add
startingLineNumber
prop toLineNumbers
7.0.1 - 2022-12-30
Fixes
- reset
table
styles 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
,language
as required props
Features
- include inferred
language
inon:highlight
event detail inHighlightAuto
- add
LineNumbers
component to support rendering line numbers - upgrade
highlight.js
to version 11.7.0
Fixes
- use
HTMLAttributes
fromsvelte/elements
to 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.js
to version 11.6.0 (net +2 styles)
6.1.1 - 2022-07-02
Fixes
- remove
language
prop type fromHighlightAuto
TypeScript definitions
6.1.1 - 2022-06-27
Refactor
- remove unnecessary
language
null check when settingdata-language
attribute - reduce
.langtag
CSS 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.md
andSUPPORTED_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/styles
tostyles
- languages are moved from
src/languages
tolanguages
- 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.js
to 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
pre
tags because Svelte v3.46.4 now preservespre
whitespace
5.2.0 - 2022-01-06
- upgrade
highlight.js
to version 11.4.0 (net +1 style)
5.1.4 - 2021-12-18
- recommend installing
highlight.js
as a dependency for pnpm users
5.1.3 - 2021-11-13
- patch
highlight.js
to 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.js
to v11.3.0
5.0.0 - 2021-10-08
Breaking Changes
- use
.svelte.d.ts
extension for TypeScript definitions
4.0.0 - 2021-09-16
Breaking Changes
- move
.hljs
class frompre
element tocode
to align with the intended usage ofhighlight.js
- change padding of
pre.langtag::after
to1em
to prevent overpadding
3.4.0 - 2021-09-12
Features
- add
data-language
attribute topre
element to allow targeted styling - add
langtag
prop 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.js
to v11.2.0
3.1.0 - 2021-07-08
Features
- upgrade
highlight.js
to v11.1.0
3.0.0 - 2021-05-30
Breaking Changes
github-gist
style removed fromhighlight.js
Features
- upgrade
highlight.js
to v11.0.0- +2 styles (
github-dark
,github-dark-dimmed
)
- +2 styles (
2.1.0 - 2021-05-21
Features
- upgrade
highlight.js
to v11.0.0-beta1- +1 language (
wren
) - +1 style (
colors
)
- +1 language (
2.0.0 - 2021-04-30
Breaking Changes
- upgrade
highlight.js
to 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
.js
extension when importinghighlight.js
language - sort
types/styles/index.d.ts
by name
2.0.0-rc.0 - 2021-04-30
Breaking Changes
- upgrade
highlight.js
to 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.js
to version 10.7 - remove all forwarded events from
Highlight
,HighlightSvelte
- remove legacy component; replace with
Highlight.svelte
as the default export - remove Rollup from build process; only ship Svelte source code and languages/styles as ESM
- remove
highlightjs-svelte
dependency; use XML/JavaScript/CSS as sublanguages
Features
- add
HighlightAuto
component that auto highlights code - major bundle size improvements by using only the
core
library
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
types
folder 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
,HighlightSvelte
components; maintain backwards compatibility withLegacy
component -
Require svelte^3.20.x as a peer dependency due to usage of the
$$restProps
API -
Support Svelte syntax highlighting by wrapping
highlightjs-svelte
-
Dispatch
highlight
event -
Forward the following events to the
pre
element (on:click, on:mouseover, on:mouseenter, on:mouseleave, on:focus, on:blur)
0.5.0 - 2020-03-27
- Add editable support by exporting
contenteditable
,spellcheck
props (#105)
0.4.1 - 2020-02-01
- Bump
highlight.js
version from9.17.1
to9.18.1
0.4.0 - 2019-12-18
0.3.5 - 2019-12-14
-
Use
gh-pages
to publish demo -
Move documentation for supported languages, styles to
docs
folder
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
code
prop 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
svelte
import by publishingsrc
folder
0.1.0 - 2019-11-09
- Initial release