highlight.js
Advanced tools
Changelog
Version 11.3.1
Build:
Changelog
Version 11.3.0
Build:
HighlightJS
named export (#3295) [Josh Goebel][].default
named export to CJS builds (#3333) [Josh Goebel][]Parser:
throwUnescapedHTML
to warn against potential HTML injection [Josh Goebel][]regex
helper functions via hljs
injection [Josh Goebel][]
Grammars:
class X extends Y
(#3278) [Josh Goebel][]Float32Array
highlighted incorrectly (#3353) [Josh Goebel][]error
type [Josh Goebel][]SUBST
is no longer highlighted [Josh Goebel][]xor_eq
keyword highlighting. [Denis Kovalchuk][]do
and then
keyword (#3323) [Nicolas Stucki][]enum
, export
and given
keywords (#3328) [Nicolas Stucki][]extension
soft keyword (#3326) [Nicolas Stucki][]end
soft keyword (#3327) [Nicolas Stucki][]inline
soft keyword (#3329) [Nicolas Stucki][]using
soft keyword (#3330) [Nicolas Stucki][]f#
alias (#3337) [Bahnschrift][]case_insensitive
to true
(#3351) [idleberg][]Changelog
Version 11.2.0
Build:
Parser:
_
(#3283) [Josh Goebel][]__FILE__
and __LINE__
constants (#3283) [Josh Goebel][]Grammars:
isolated
/nonisolated
keywords (#3296) [Bradley Mackey][]New Languages:
Changelog
Version 11.1.0
Grammars:
catch
keyword (#3251) [Konrad Rudolph][]pwsh
alias (#3236) [tebeco][]edn
alias (#3213) [Stel Abrego][]Changelog
Version 11.0.0
This is a major release. As such it contains breaking changes which may require action from users. Please read VERSION_11_UPGRADE.md for a detailed summary of all breaking changes.
Unless otherwise attributed items below are thanks to [Josh Goebel][] (ref: #2558).
The below list should only be considered to be a high-level summary.
Deprecations / Removals / API Changes:
initHighlighting()
and initHighlightingOnLoad()
deprecated. Use highlightAll()
.highlightBlock(el)
deprecated. Use highlightElement(el)
before:highlightBlock
& after:highlightBlock
callbacks deprecated. Use equivalent highlightElement
callbacks.highlight(languageName, code, ignoreIllegals, continuation)
signature deprecated. Use highlight(code, {language, ignoreIllegals})
.highlight()
signature no longer supports continuation
argument.tabReplace
option removed. Consider a plugin.useBR
option removed. Consider a plugin or CSS.requireLanguage()
removed. Use getLanguage()
.endSameAsBegin
mode key removed. Use hljs.END_SAME_AS_BEGIN
.lexemes
mode key removed. Use keywords.$pattern
.Security:
Themes:
schoolbook
has been updated to remove the lined background.github
updated to better match modern GitHub (#1616) [Jan Pilzer][]github-gist
has been removed in favor of github
[Jan Pilzer][]nnfx
updated for v11 xml styles and improved css supportLanguage Grammars:
Parser:
beginScope
and endScope
to allow separate scoping begin and end (#3159) [Josh Goebel][]endScope
now supports multi-class matchers as well (#3159) [Josh Goebel][]highlightElement
now always tags blocks with a consistent language-[name]
class [Josh Goebel][]
span
tags now also always have the language-
prefix addedtitle.class.inherited
sub-scope support [Josh Goebel][]title.class
sub-scope support (#3078) [Josh Goebel][]title.function
sub-scope support (#3078) [Josh Goebel][]beforeMatch
compiler extension (#3078) [Josh Goebel][]cssSelector
configuration option (#3180) [James Edington][]Grammars:
.meta-keyword
=> .meta .keyword
(nested scopes) (#3167) [Josh Goebel][].meta-string
=> .meta .string
(nested scopes) (#3167) [Josh Goebel][]actor
keyword (#3171) [Bradley Mackey][]@resultBuilder
attribute (#3151) [Bradley Mackey][]pde
alias (#3142) [Dylan McBean][]function.title
=> title.function
(#3078) [Josh Goebel][]function.title
=> title.function
(#3078) [Josh Goebel][]function.title
=> title.function
(#3078) [Josh Goebel][]impl
(#3078) [Josh Goebel][]New Languages:
Theme Improvements:
builtin-name
CSS class (#3119) [Josh Goebel][]New Themes:
Dev Improvements: