All Versions
Latest Version
Avg Release Cycle
32 days
Latest Release

Changelog History
Page 8

  • v8.8.0 Changes

    πŸ†• New languages:

    πŸ›  Notable fixes and improvements to existing languages:

    • 0️⃣ JavaScript highlighting no longer fails with ES6 default parameters
    • βž• Added keywords async and await to Python
    • πŸ‘ PHP heredoc support improved
    • πŸ‘ Allow preprocessor directives within C++ functions

    Other notable changes:

    • πŸ”„ Change versions to X.Y.Z SemVer-compatible format
    • βž• Added ability to build all targets at once
  • v8.7 Changes

    πŸ†• New languages:

    πŸ†• New styles:

    πŸ›  Notable fixes and improvements to existing languages:

    • πŸ›  Fix encoding of images when copied over in certain builds
    • πŸ›  Fix incorrect highlighting of the word "bug" in comments
    • Treat decorators different from matrix multiplication in Python
    • πŸ›  Fix traits inheritance highlighting in Rust
    • πŸ›  Fix incorrect document
    • Oracle keywords added to SQL language definition by Vadimtro
    • Postgres keywords added to SQL language definition by Benjamin Auder
    • πŸ›  Fix registers in x86asm being highlighted as a hex number
    • πŸ›  Fix highlighting for numbers with a leading decimal point
    • Correctly highlight numbers and strings inside of C/C++ macros
    • 🚚 C/C++ functions now support pointer, reference, and move returns
  • v8.6 Changes

    πŸ†• New languages:

    πŸ†• New styles:

    πŸ›  Notable fixes and improvements to existing languages:

    • πŸ‘ Multi-line raw strings from C++11 are now supported
    • πŸ›  Fix class names with dashes in HAML
    • πŸ‘ The async keyword from ES6/7 is now supported
    • πŸ‘ TypeScript functions handle type and parameter complexity better
    • We unified phpdoc/javadoc/yardoc etc modes across all languages
    • CSS .class selectors relevance was dropped to prevent wrong language detection
    • πŸ— Images is now included to CDN build
    • πŸš€ Release process is now automated
  • v8.5 Changes

    πŸ†• New languages:

    πŸ†• New styles:

    πŸ›  Notable fixes and improvements to existing languages:

    • πŸ‘ ES6 features in JavaScript are better supported now by Gu Yiling.
    • Swift now recognizes body-less method definitions.
    • Single expression functions def foo, do: ... now work in Elixir.
    • More uniform detection of built-in classes in Objective C.
    • πŸ›  Fixes for number literals and processor directives in Rust.
    • HTML <script> tag now allows any language, not just JavaScript.
    • πŸ‘ Multi-line comments are supported now in MatLab.

    πŸ’» [Peter Piwowarski]:

  • v8.4 Changes

    We've got the new demo page! The obvious new feature is the new look, but apart from that it's got smarter: by presenting languages in groups it avoids βš™ running 10000 highlighting attempts after first load which was slowing it down βœ… and giving bad overall impression. It is now also being generated from test ⚑️ code snippets so the authors of new languages don't have to update both tests and the demo page with the same thing.

    Other notable changes:

    • The template_comment class is gone in favor of the more general comment.
    • πŸ“œ Number parsing unified and improved across languages.
    • C++, Java and C# now use unified grammar to highlight titles in function/method definitions.
    • πŸ— The browser build is now usable as an AMD module, there's no separate build target for that anymore.
    • OCaml has got a comprehensive overhaul by MickaΓ«l Delahaye.
    • Clojure's data structures and literals are now highlighted outside of lists and we can now highlight Clojure's REPL sessions.

    πŸ†• New languages:

  • v8.3 Changes

    We streamlined our tool chain, it is now based entirely on node.js instead of πŸ— being a mix of node.js, Python and Java. The build script options and arguments πŸ“š remained the same, and we've noted all the changes in the [documentation][b]. πŸ— Apart from reducing complexity, the new build script is also faster from not having to start Java machine repeatedly. The credits for the work go to Jeremy Hull.

    πŸ›  Some notable fixes:

    • PHP and JavaScript mixed in HTML now live happily with each other.
    • JavaScript regexes now understand ES6 flags "u" and "y".
    • throw keyword is no longer detected as a method name in Java.
    • πŸ›  Fixed parsing of numbers and symbols in Clojure thanks to input from Ivan Kleshnin.

    πŸ†• New languages in this release:

    πŸ— [b]:

    πŸš€ [ps]:

  • v8.2 Changes

    βœ… We've finally got [real tests][test] and continuous testing on Travis βœ… thanks to Jeremy Hull and Chris Eidhof. The tests designed to cover πŸ“œ everything: language detection, correct parsing of individual language features and various special cases. This is a very important change that gives us πŸ”¨ confidence in extending language definitions and refactoring library core.

    βœ… We're going to redesign the old [demo/test suite][demo] into an interactive 🌐 demo web app. If you're confident front-end developer or designer and want to help us with it, drop a comment into the issue on GitHub.

    βœ… [test]: βœ… [demo]:

    πŸš€ As usually there's a handful of new languages in this release:

    Other improvements:

    • Erik Osheim heavily reworked Scala definitions making it richer.
    • πŸ’Ž Lucas Mazza fixed Ruby hashes highlighting
    • Lisp variants (Lisp, Clojure and Scheme) are unified in regard to naming the first symbol in parentheses: it's "keyword" in general case and also "built_in" for built-in functions in Clojure and Scheme.
  • v8.1 Changes

    πŸ†• New languages:

    πŸ†• New styles:

    Other improvements:

    • The README is heavily reworked and brought up to date by Jeremy Hull.
    • βž• Added [listLanguages()][ll] method in the API.
    • πŸ‘Œ Improved C/C++/C# detection.
    • βž• Added a bunch of new language aliases, documented the existing ones. Thanks to Sindre Sorhus for background research.
    • βž• Added phrasal English words to boost relevance in comments.
    • Many improvements to SQL definition made by Heiko August, Nikolay Lisienko and Travis Odom.
    • πŸ‘ The shorter lang- prefix for language names in HTML classes supported alongside language-. Thanks to Jeff Escalante.
    • πŸ’Ž Ruby's got support for interactive console sessions. Thanks to Pascal Hurni.
    • βž• Added built-in functions for R language. Thanks to Artem A. Klevtsov.
    • Rust's got definition for lifetime parameters and improved string syntax. Thanks to Roman Shmatov.
    • Various improvements to Objective-C definition by Matt Diephouse.
    • πŸ›  Fixed highlighting of generics in Java.

    βœ… [ll]:

  • v8.0 Changes

    πŸš€ This new major release is quite a big overhaul bringing both new features and some backwards incompatible changes. However, chances are that the majority of πŸ‘‰ users won't be affected by the latter: the basic scenario described in the README is left intact.

    Here's what did change in an incompatible way:

    • We're now prefixing all classes located in [CSS classes reference][cr] with hljs-, by default, because some class names would collide with other people's stylesheets. If you were using an older version, you might still want the previous behavior, but still want to upgrade. To suppress this new behavior, you would initialize like so:
      <script type="text/javascript">
        hljs.configure({classPrefix: ''});
    • tabReplace and useBR that were used in different places are also unified into the global options object and are to be set using configure(options). This function is documented in our [API docs][]. Also note that these parameters are gone from highlightBlock and fixMarkup which are now also rely on configure.

    • 🚚 We removed public-facing (though undocumented) object hljs.LANGUAGES which was used to register languages with the library in favor of two new methods: registerLanguage and getLanguage. Both are documented in our [API docs][].

    • Result returned from highlight and highlightAuto no longer contains two separate attributes contributing to relevance score, relevance and keyword_count. They are now unified in relevance.

    Another technically compatible change that nonetheless might need attention:

    • πŸ”¨ The structure of the NPM package was refactored, so if you had installed it locally, you'll have to update your paths. The usual require('highlight.js') works as before. This is contributed by Dmitry Smolin.

    πŸ†• New features:

    • Languages now can be recognized by multiple names like "js" for JavaScript or "html" for, well, HTML (which earlier insisted on calling it "xml"). These aliases can be specified in the class attribute of the code container in your HTML as well as in various API calls. For now there are only a few very common aliases but we'll expand it in the future. All of them are listed in the [class reference][cr].

    • Language detection can now be restricted to a subset of languages relevant in a given context β€” a web page or even a single highlighting call. This is especially useful for node.js build that includes all the known languages. Another example is a StackOverflow-style site where users specify languages as tags rather than in the markdown-formatted code snippets. This is documented in the [API reference][] (see methods highlightAuto and configure).

    • Language definition syntax streamlined with variants and beginKeywords.

    πŸ†• New languages and styles:

    Miscellaneous improvements:

    • Highlighting => prompts in Clojure.
    • πŸ’… Jeremy Hull fixed a lot of styles for consistency.
    • Finally, highlighting PHP and HTML mixed in peculiar ways.
    • Objective C and C# now properly highlight titles in method definition.
    • Big overhaul of relevance counting for a number of languages. Please do report bugs about mis-detection of non-trivial code snippets!

    βœ… [API reference]:

    βœ… [cr]: βœ… [api docs]:

  • v7.5 Changes

    πŸš€ A catch-up release dealing with some of the accumulated contributions. This one is probably will be the last before the 8.0 which will be slightly backwards incompatible regarding some advanced use-cases.

    One outstanding change in this version is the addition of 6 languages to the hosted script: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and πŸ‘‰ Makefile. It now weighs about 6K more but we're going to keep it under 30K.

    πŸ†• New languages:

    πŸ‘Œ Improvements:

    • πŸ’Ž Ruby's got support for characters like ?A, ?1, ?\012 etc. and %r{..} regexps.
    • Clojure now allows a function call in the beginning of s-expressions (($filter "myCount") (arr 1 2 3 4 5)).
    • Haskell's got new keywords and now recognizes more things like pragmas, preprocessors, modules, containers, FFIs etc. Thanks to Zena Treep for the implementation and to Jeremy Hull for guiding it.
    • πŸ›  Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.