Releases: highlightjs/highlight.js
10.2.0
Version 10.2.0
Parser Engine:
- (fix) When ignoring a potential match highlighting can terminate early (#2649) Josh Goebel
New themes:
- Gradient Light by Samia Ali
Deprecations:
fixMarkup
is now deprecated and will be removed in v11.0. (#2534) Josh Goebel
Big picture:
- Add simple Vue plugin for basic use cases (#2544) Josh Goebel
Language Improvements:
- fix(bash) Fewer false positives for keywords in arguments (#2669) sirosen
- fix(js) Prevent long series of /////// from causing freezes (#2656) Josh Goebel
- enh(csharp) Add
init
andrecord
keywords for C# 9.0 (#2660) Youssef Victor - enh(matlab) Add new R2019b
arguments
keyword and fixenumeration
keyword (#2619) Andrew Janke - fix(kotlin) Remove very old keywords and update example code (#2623) kageru
- fix(night) Prevent object prototypes method values from being returned in
getLanguage
(#2636) night - enh(java) Add support for
enum
, which will identify as aclass
now (#2643) ezksd - enh(nsis) Add support for NSIS 3.06 commands (#2653) idleberg
- enh(php) detect newer more flexible HEREdoc syntax (#2658) eytienne
10.1.2
10.1.1
10.1.0
Just your typical minor release. Plenty of fixes and enhancements, few new themes.
Some deprecations language maintainers might want to pay attention to:
htmlbars
grammar is now deprecated. Usehandlebars
instead. (#2344) [Nils Knappmeier][]- when using
highlightBlock
result.re
deprecated. Useresult.relevance
instead. (#2552) [Josh Goebel][] - ditto for
result.second_best.re
=>result.second_best.relevance
(#2552) lexemes
is now deprecated in favor ofkeywords.$pattern
key (#2519) [Josh Goebel][]endSameAsBegin
is now deprecated. (#2261) [Josh Goebel][]
10.0.2
Fixes a serious potential freeze/infinite loop issue. Everyone on version 10 should upgrade.
- Remove support for AMD module loading, which never truly worked properly anyways.
10.0.1
10.0.0
Welcome to version 10.0. This a major release and therefore will contain breaking changes.
Breaking Changes
Our normal minor releases try to never break anything, holding all breaking changes for major releases.
We tried to squeeze in as many as we could this time so that after 10.0 ships we'll be back to quiet sailing for a while before we need to push version 11. That said, we're very conservative about what we consider a breaking change.
i.e., if there it could possibly break things for anyone, it's typically a breaking change. The fact is a vast majority of users should upgrade and probably not notice any changes at all.
See VERSION_10_BREAKING_CHANGES.md for a comprehensive list of breaking changes, but here is a summary... if you use:
Core highlight.js lib on the client (with no extra CDN languages)
Just keep doing that.
- If you're using
darkula.css
, you'll need to change that todarcula.css
- The minified distributable has changed from
.pack.js
to.min.js
, update your name when you update your URL. - If your users have very old browsers, they may no longer be supported (no more IE11, etc.). (We're using ES2015 code now.)
nohighlight
orno-highlight
are the only two CSS classes that will SKIP highlighting completely.*text*
and*plain*
no longer will do this.
Core highlight.js lib on the client (plus additional CDN languages)
Quite a few grammars have been renamed. Ex: nimrod.js
is now nim.js
.
- Check the renamed grammars to see if you might need to update your links.
- Be aware that you can't use version 9 CDN JS files anymore, they aren't compatible.
- Plus read the above list of items.
highlight.js on the server (via NPM) and only use the public API
If you're just pulling in the FULL library (require('./highlight.js')
) just keep doing that. You might not need to change anything.
- If you're manually loading a smaller set of languages and using
registerLanguage
make sure you check out all the renamed grammars and dependency changes. - Read the client-side lists above also.
highlight.js on the server (via NPM) with a custom integration
Read the complete breaking changes list carefully.
- Read the client-side lists above also.
highlight.js lib on the client, with source directly from our GitHub repo
That will no longer work. The source needs to be built to work properly and cannot be used "raw" unless you've also setup your own build pipeline (rollup, etc.). Fetch a static build from the CDN, the cdn-release repo or use the new highlightjs-dist
NPM package.
highlight.js source code directly from our GitHub repo with a custom integration
All bets are off, since we only try to guarantee stability of our NPM and CDN builds and the public API. Read all the breaking changes and perhaps skim the commit history.
- We're using ES6 modules now.
- We're using an entirely new build system.
- The source will likely become more and more modular during the 10.0 timeline.
Enjoy and good luck.
As always if you have any questions or issues, jump on the Github Issues.
9.18.1 - Brrrrr, it’s freezing.
Quick release to resolve #2375