Welcome to version 10.0. This a major release and therefore will contain 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.
IE, 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:
Just keep doing that.
darkula.css
, you'll need to change that to darcula.css
.pack.js
to .min.js
, update your name when you update your URL.nohighlight
or no-highlight
are the only two CSS classes that will SKIP highlighting completely. *text*
and *plain*
no longer will do this.Quite a few grammars have been renamed. Ex: nimrod.js
is now nim.js
.
If you're just pulling in the FULL library (require('./highlight.js')
) just keep doing that. You might not need to change anything.
registerLanguage
make sure you check out all the renamed grammars and dependency changes.Read the complete breaking changes list carefully.
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.
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.
As always if you have any questions or issues, jump on the Github Issues.