All Versions
Latest Version
Avg Release Cycle
18 days
Latest Release

Changelog History
Page 1

  • v10.1.0

    πŸ†• New themes:

    πŸ“œ Parser Engine:

    • πŸ“œ (parser) Now escapes quotes in text content when escaping HTML (#2564) Josh Goebel
    • πŸ“œ (parser) Adds keywords.$pattern key to grammar definitions (#2519) Josh Goebel
    • πŸ“œ (parser) Adds SHEBANG utility mode Josh Goebel
    • πŸ“œ (parser) Adds registerAliases method (#2540) [Taufik Nurrohman][]
    • (enh) Added on:begin callback for modes (#2261) Josh Goebel
    • (enh) Added on:end callback for modes (#2261) Josh Goebel
    • (enh) Added ability to programatically ignore begin and end matches (#2261) Josh Goebel
    • (enh) Added END_SAME_AS_BEGIN mode to replace endSameAsBegin parser attribute (#2261) Josh Goebel
    • (fix) fixMarkup would rarely destroy markup when useBR was enabled (#2532) Josh Goebel

    πŸ—„ Deprecations:

    • πŸ—„ htmlbars grammar is now deprecated. Use handlebars instead. (#2344) Nils Knappmeier
    • πŸ—„ when using highlightBlock deprecated. Use result.relevance instead. (#2552) Josh Goebel
    • ditto for => 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

    Language Improvements:

    • πŸ›  fix(groovy) strings are not allowed inside ternary clauses (#2217) Josh Goebel
    • πŸ›  fix(typescript) add readonly keyword (#2562) Martin (Lhoerion)
    • πŸ›  fix(javascript) fix regex inside parens after a non-regex (#2530) Josh Goebel
    • enh(typescript) use identifier to match potential keywords, preventing false positivites (#2519) Josh Goebel
    • enh(javascript) use identifier to match potential keywords, preventing false positivites (#2519) Josh Goebel
    • ⚑️ [enh] Add OPTIMIZE: and HACK: to the labels highlighted inside comments Josh Goebel
    • enh(typescript/javascript/coffeescript/livescript) derive ECMAscript keywords from a common foudation (#2518) Josh Goebel
    • enh(typescript) add setInterval, setTimeout, clearInterval, clearTimeout (#2514) Josh Goebel
    • enh(javascript) add setInterval, setTimeout, clearInterval, clearTimeout (#2514) Vania Kucher
    • enh(cpp) add pair, make_pair, priority_queue as built-ins (#2538) Hankun Lin
    • enh(cpp) recognize priority_queue pair as cpp containers (#2541) Hankun Lin
    • πŸ›  fix(javascript) prevent set keyword conflicting with setTimeout, etc. (#2514) Vania Kucher
    • πŸ›  fix(cpp) Fix highlighting of unterminated raw strings (#2261) David Benjamin
    • πŸ›  fix(javascript) => function with nested () in params now works (#2502) Josh Goebel
    • πŸ›  fix(typescript) => function with nested () in params now works (#2502) Josh Goebel
    • πŸ›  fix(yaml) Fix tags to include non-word characters (#2486) Peter Plantinga
    • πŸ›  fix(swift) @objcMembers was being partially highlighted (#2543) Nick Randall
    • enh(dart) Add late and required keywords, and Never built-in type (#2550) Sam Rawlins
    • enh(erlang) Add underscore separators to numeric literals (#2554) Sergey Prokhorov
    • πŸ‘ enh(handlebars) Support for sub-expressions, path-expressions, hashes, block-parameters and literals (#2344) Nils Knappmeier
  • v10.0.3

    May 12, 2020
  • v10.0.2

    May 03, 2020

    πŸ— Brower build:

    • Issue (bug) Fix: Version 10 fails to load as CommonJS module. (#2511) Josh Goebel
    • 🚚 Issue (removal) AMD module loading support has been removed. (#2511) Josh Goebel

    πŸ“œ Parser Engine Changes:

    • πŸ“œ Issue fix(parser) Fix freez issue with illegal 0 width matches (#2524) Josh Goebel
  • v10.0.1

    April 26, 2020

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

  • v10.0.0

    March 10, 2020

    πŸ†• New languages:

    • βž• add(php-template) Explicit language to detect PHP templates (vs xml) Josh Goebel
    • enh(python) Added python-repl for Python REPL sessions
    • βž• add(never) Added 3rd party Never language support

    πŸ†• New themes:

    πŸ“œ Parser Engine Changes:

    • (bug) Fix beginKeywords to ignore . matches (#2434) Josh Goebel
    • πŸ”Œ (enh) add before:highlight plugin API callback (#2395) Josh Goebel
    • πŸ”Œ (enh) add after:highlight plugin API callback (#2395) Josh Goebel
    • πŸ“œ (enh) split out parse tree generation and HTML rendering concerns (#2404) Josh Goebel
    • (enh) every language can have a name attribute now (#2400) Josh Goebel
    • (enh) improve regular expression detect (less false-positives) (#2380) Josh Goebel
    • πŸ”§ (enh) make noHighlightRe and languagePrefixRe configurable (#2374) Josh Goebel

    Language Improvements:

    • enh(python) Exclude parens from functions params (#2490) Álvaro MondΓ©jar
    • enh(swift) Add compactMap to keywords as built_in (#2478) Omid Golparvar
    • enh(nim) adds func keyword (#2468) Adnan Yaqoob
    • πŸ—„ enh(xml) deprecate ActionScript inside script tags (#2444) Josh Goebel
    • πŸ›  fix(javascript) prevent get/set variables conflicting with keywords (#2440) Josh Goebel
    • πŸ› bug(clojure) Now highlights defn- properly (#2438) Josh Goebel
    • 0️⃣ enh(bash) default value is another variable (#2439) Josh Goebel
    • enh(bash) string nested within string (#2439) Josh Goebel
    • πŸ‘ enh(bash) Add arithmetic expression support (#2439) Josh Goebel
    • πŸ‘ enh(clojure) Add support for global definitions name (#2347) Alexandre Grison
    • πŸ’… enh(fortran) Support Fortran 77 style comments (#2416) Josh Goebel
    • πŸ’… (csharp) add support for @identifier style identifiers (#2414) Josh Goebel
    • πŸ›  fix(elixir) Support function names with a slash (#2406) Josh Goebel
    • πŸ›  fix(javascript) comma is allowed in a "value container" (#2403) Josh Goebel
    • enh(apache) add deny and allow keywords Josh Goebel
    • enh(apache) highlight numeric attributes values Josh Goebel
    • enh(apache) highlight IP addresses, ports, and strings in sections Josh Goebel
    • enh(php) added more keywords and include <?= syntax to meta Taufik Nurrohman
    • πŸ›  fix(protobuf) Fix rpc when followed by a block (#) Josh Goebel
    • enh(zephir) almost complete rework of the zephir grammar (#2387) Josh Goebel
    • πŸ‘ (markdown) much improved code block support (#2382) Josh Goebel
    • (markdown) improve bold/italic nesting (#2382) Josh Goebel
    • πŸ‘ enh(csharp) Support where keyword as class constraint (#2378) Josh Goebel
    • enh(csharp) Allow reference path in class inheritance lists (#2378) Josh Goebel
    • enh(csharp) Add generic modifiers (in, out) (#2378) Josh Goebel
    • πŸ‘ (fortran) enh(fortran) support intrinsic data types (#2379) Josh Goebel
    • enh(java) annotations can include numbers (#2377) Josh Goebel
    • enh(java) annotations can take params (#2377) Josh Goebel
    • enh(java) allow annotations inside function call params (#2377) Josh Goebel
    • πŸ”Œ enh(parser) pre/post-highlightBlock callbacks via plugin (#2285) Josh Goebel
    • (fortran) Add Fortran 2018 keywords and coarray intrinsics (#2361) Sam Miller
    • (delphi) highlight hexadecimal, octal, and binary numbers (#2370) Robert Riebisch
    • enh(plaintext) added text and txt as alias (#2360) Taufik Nurrohman
    • 0️⃣ enh(powershell) added PowerShell v5.1/v7 default aliases as "built_in"s (#2423) Sean Williams
    • πŸ‘ enh(yaml) added support for timestamps (#2475) [Peter Plantinga][]

    Developer Tools:

    • βž• added Dockerfile for optionally developing with a container
  • v10.0.0-beta.0

    March 10, 2020

    πŸš€ Welcome to version 10.0 (BETA). 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.

    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 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.

  • v9.18.1

    February 01, 2020

    Grammar Improvements:

    • πŸ› bug(coffeescript) fix freezing bug due to badly behaved regex (#2376) Josh Goebel
  • v9.18.0

    January 20, 2020

    πŸ†• New languages:

    • none.

    πŸ†• New themes:

    • none.

    Core Changes:

    • none.

    Language Improvements:

    • (javascript) fix JSX self-closing tag issues (#2322) Josh Goebel
    • (fortran) added block and endblock keywords (#2343) Philipp Engel
    • πŸ‘ (javascript) support jsx fragments (#2333) Josh Goebel
    • πŸ‘ (ini) support TOML arrays, clean up grammar (#2335) Josh Goebel
    • (vbnet) add nameof operator to the keywords (#2329) Youssef Victor
    • ⚑️ (stan) updated with improved coverage of language keywords and patterns. (#1829) Jeffrey Arnold
    • enh(cpp) Detect namespaced function types (A::typeName func(...)) (#2332) Josh Goebel
    • enh(cpp) Detect namespaced functions also (A::functionName) (#2332) Josh Goebel
    • enh(cpp) Properly detect decltype(auto) (#2332) Josh Goebel
    • enh(cpp) recognize primitive types (int8_t, etc.) as function types (#2332) Josh Goebel

    Developer Tools:

    • πŸ“œ feat(developer): add button to show parsed structure (#2345) Nils Knappmeier
  • v9.17.1

    December 12, 2019

    πŸ›  Fixes:

    • πŸ›  fix(parser): resolve IE 11 issue with Object.freeze() (#2319) Josh Goebel
  • v9.17.0

    December 11, 2019

    πŸ†• New languages:

    • none.

    πŸ†• New themes:

    Core Improvements:

    • πŸ“œ chore(parser): switch from createElementNS to createElement (#2314) Josh Goebel
    • πŸ“œ enh(parser): add better error when a language requirement is missing (#2311) Josh Goebel
    • πŸ›  fix(parser/docs): disallow self mode at the top-level of a language (#2294) Josh Goebel
    • πŸ“œ enh(parser) add safe & debug modes. Better error handling for crash conditions. (#2286) Josh Goebel
    • πŸ›  fix(parser): Fix merger HTML attribute quoting (#2235) Josh Goebel
    • πŸ›  fix(parser): Look-ahead regex now work for end matches also (#2237) Josh Goebel
    • πŸ›  fix(parser): Better errors when a language is missing (#2236) Josh Goebel
    • πŸ›  fix(parser): freeze built-in modes to prevent grammars altering them (#2271) Josh Goebel
    • πŸ›  fix(themes): fix inconsistencies between some themes padding/spacing (#2300) Josh Goebel
    • πŸ— ehh(build) Add CI check for building a "use strict" safe rollup package from NPM builds (#2247) Josh Goebel
    • πŸ›  fix(pkg): Prefix global addEventListener with window to be able to minify with closure compiler (#2305) Kirill Saksin

    Language Improvements:

    • πŸ›  fix(sql): backslash is not used to escape in strings in standard SQL (#1748) Mike Schall
    • enh(ebnf) add backticks as additional string variant (#2290) Chris Marchesi
    • chore(javascript): add esm related extensions to aliases (#2298) Rongjian Zhang
    • πŸ›  fix(kotlin): fix termination of """ string literals (#2295) Josh Goebel
    • πŸ›  fix(mercury): don't change global STRING modes (#2271) Josh Goebel
    • enh(xml) expand and improve document type highlighting (#2287) w3suli
    • enh(ebnf) add underscore as allowed meta identifier character, and dot as terminator (#2281) Chris Marchesi
    • πŸ›  fix(makefile) fix double relevance for assigns, improves auto-detection (#2278) Josh Goebel
    • πŸ‘ enh(xml) support for highlighting entities (#2260) w3suli
    • enh(gml) fix naming of keyword class (consistency fix) (#2254) Liam Nobel
    • πŸ‘ enh(javascript): Add support for jsdoc comments (#2245) Milutin Kristofic
    • πŸ›  fix(python) fix if getting confused as an f-string (#2200) Josh Goebel and Carl Baxter
    • enh(powershell) major overhaul, huge improvements (#2224)
    • enh(css) Improve @rule highlighting, including properties (#2241) Josh Goebel
    • enh(css) Improve highlighting of numbers inside expr/func calc(2px+3px) (#2241)
    • enh(scss) Pull some of the CSS improvements back into SCSS (#2241)
    • πŸ›  fix(go): Fix escaped character literals (#2266) David Benjamin
    • πŸ›  fix(objectivec): Fix various preprocessor highlighting issues (#2265) David Benjamin
    • πŸ›  fix(objectivec): Handle multibyte character literals (#2268) David Benjamin
    • enh(cpp): Add additional keywords (#2289) Adrian Ostrowski