Skip to content

Releases: highlightjs/highlight.js

10.2.1

08 Oct 12:03
Compare
Choose a tag to compare

Version 10.2.1

Parser Engine:

  • fix(parser) complete fix for resuming matches from same index (#2678) Josh Goebel

10.2.0

07 Sep 20:21
Compare
Choose a tag to compare

Version 10.2.0

Parser Engine:

  • (fix) When ignoring a potential match highlighting can terminate early (#2649) Josh Goebel

New themes:

Deprecations:

Big picture:

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 and record keywords for C# 9.0 (#2660) Youssef Victor
  • enh(matlab) Add new R2019b arguments keyword and fix enumeration 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 a class 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

23 Jul 21:06
Compare
Choose a tag to compare

Fixes:

  • fix(night) Prevent object prototype values from being returned by getLanguage (#2636) night

10.1.1

02 Jul 20:23
Compare
Choose a tag to compare

Fixes:

  • Resolve issue on Node 6 due to dangling comma (#2608) [Edwin Hoogerbeets][]
  • Resolve index.d.ts is not a module error (#2603) [Josh Goebel][]

10.1.0

11 Jun 23:29
Compare
Choose a tag to compare

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. Use handlebars instead. (#2344) [Nils Knappmeier][]
  • when using highlightBlock result.re deprecated. Use result.relevance instead. (#2552) [Josh Goebel][]
  • ditto for result.second_best.re => result.second_best.relevance (#2552)
  • lexemes is now deprecated in favor of keywords.$pattern key (#2519) [Josh Goebel][]
  • endSameAsBegin is now deprecated. (#2261) [Josh Goebel][]

10.0.2

03 May 21:13
Compare
Choose a tag to compare

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

26 Apr 22:40
Compare
Choose a tag to compare

Fixes: sublanguage with no rule matches causes text to disappear in final output. (#2506).

10.0.0

10 Mar 18:05
Compare
Choose a tag to compare

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 to darcula.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 or no-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.

01 Feb 17:45
Compare
Choose a tag to compare

Quick release to resolve #2375