highlight.js v10.1.0 Release Notes

Release Date: 2020-06-11 // almost 4 years ago
  • ๐Ÿ†• 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 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

    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, the Never built-in type, and nullable built-in types (#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
    • ๐Ÿ‘ enh(protobuf) Support multiline comments (#2597) Pavel Evstigneev
    • ๐Ÿ›  fix(toml) Improve key parsing (#2595) Antoine du Hamel