JavaScript syntax highlighter with language auto-detection and zero dependencies.
CAVEATS / POTENTIALLY BREAKING CHANGES
node
build styles/*.css
files now ship un-minified
with minified counterparts as: styles/*.min.css
mvorisek
(this makes things consistent with our cdn
builds)Parser:
New Grammars:
Core Grammars:
if
while
for
[Omar Hussein][]x0-x30
and w0-w30
ARMv8 registers Nicholas Thompson
final
, is
, macro
keywords and $
identifiers Robert Borghese
abstract
declaration from keyword Robert Borghese
macro
keyword Bradley Mackey
@unchecked
and @Sendable
support Bradley Mackey
//> using foo bar
[Jamie Thompson][]!assert
compiler flag [idleberg][]eprintln!
macro qoheniac
warn_unqualified_access
is an attribute Bradley Mackey
record
and var
as keywords Guillaume Laforge
Developer Tool:
highlight
API. Shah Shabbir Ahmmed
Parser engine:
__emitTokens
key to grammars to allow then to direct their own parsing, only using Highlight.js for the HTML rendering Josh Goebel
removePlugin
api faga295
JavaScript
Cyrus Kao
New Grammars:
Core Grammars:
_
in variable names [joshgoebel][]proto
alias for Protobuf [dimitropoulos][]base
, interface
, sealed
, and when
keywords Sam Rawlins
->
operator legal) Keyacom
select
and until
as keywordsNew Grammars:
Grammars:
scm
alias for Scheme matyklug18
<T =
are not JSX Josh Goebel
((
keyword Nick Chambers
import()
as a function, rather a keyword nathnolt
((
keyword Nick Chambers
Improvements:
Supported Node.js versions:
Default build changes:
wasm
to default :common
build (#3526) [Josh Goebel][]graphql
to default :common
build (#3526) [Josh Goebel][]Grammars:
keyword
to literal
shikhar13012001
scoped
keyword in C# (#3571) [David Pine][]transparent
keyword Matt Bovel
::
(#3540) [Josh Goebel][]include_bytes!
macro (#3541) Serial-ATA
==
as a variable declaration Mousetail
any
keyword (#3515) Bradley Mackey
distributed
keyword Marcus Ortiz
match
and case
keywords Avrumy Lunger
Just a tiny release to hopefully fix the issues some are having with CSS not seen as having side effects with web pack, etc...
Packaging:
sideEffect
for css and scss files, fixes #3504Changes from CHANGELOG:
Themes:
Tokyo-Night-dark
theme Henri Vandersleyen
Tokyo-Night-light
theme Henri Vandersleyen
New Grammars:
Grammars:
type
and variable.language
scopes Josh Goebel
$pattern
(numbers allowed in command names) Martin Mattel
meta.prompt
scope for REPL prompts, etc Josh Goebel
***Hello world***
without breaking Josh Goebel
else
Josh Goebel
This is a big one. Holidays and all. Wishing all of you the best for 2022! See the note below about theme changes if you're super picky about your theming.
New Languages:
Themes:
Default
is now much closer WCAG AA (contrast) (#3402) Josh Goebel
Dark
now meets WCAG AA (contrast) (#3402) Josh Goebel
intellij-light
theme Pegasis
These changes should be for the better and should not be super noticeable but if you're super picky about your colors you may want to intervene here or copy over the older themes from 11.3 or prior.
Grammars:
vector<<
template false positive (#3437) Josh Goebel
namespace
and use
highlighting (#3427) Josh Goebel
$this
is a variable.language
now (#3427) Josh Goebel
__COMPILER_HALT_OFFSET__
(#3427) Josh Goebel
sealed
and non-sealed
keywords (#3386) Bradley Mackey
CLASS_REFERENCE
(#3411) Josh Goebel
!
(#3417) idleberg
!
(#3420) idleberg
comment
macro catches more than it should (#3395)$
in symbol breaks highlightingregex
mode to regex literalpunctuation
mode for commas.jldoctest
alias (#3432) Fons van der Plas
Developer Tools:
Themes:
Same as 11.3.0 except for the fix to generating optional CDN grammar modules.
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
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
Build:
Parser:
Grammars:
isolated
/nonisolated
keywords (#3296) Bradley Mackey
New Languages: