unstale

npm / highlight.js

highlight.js

What changed in highlight.js 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-18.

1 breaking3 security26 new APIs and options22 behavior and defaults32 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli on npm

highlight.js 1184 changes

Breaking changes 1

  • Gherkin variables no longer allow whitespace.

    11.12.0release notes

Security 3

  • Bounds the run of type tokens before a function name to mitigate ReDoS.

    11.12.0release notes

  • Bounds the run of type tokens before a function name to mitigate ReDoS.

    11.12.0release notes

  • Removes recursive sublanguage references to prevent ReDoS.

    11.12.0release notes

New APIs and options 26

  • Adds the third-party Cedar grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party DAX grammar to the supported languages.

    11.12.0release notes

  • Adds a grammar for FreeDesktop configuration files, including .desktop and systemd files.

    11.12.0release notes

  • Adds the third-party Djot grammar to the supported languages.

    11.12.0release notes

  • Adds batch as an alias for the DOS grammar.

    11.12.0release notes

  • Adds the Equinox theme.

    11.12.0release notes

  • Adds the third-party Igor Pro grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party Jaiva grammar to the supported languages.

    11.12.0release notes

  • Adds ktm and ktx as Kotlin aliases.

    11.12.0release notes

  • Adds the third-party Liquidsoap grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party M (Power Query) grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party MoonBit grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party Pkl grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party RAScript grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party Veryl grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party Why3 grammar to the supported languages.

    11.12.0release notes

  • Adds the third-party Xojo grammar to the supported languages.

    11.12.0release notes

  • Adds the 3rd party Abc Notation grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party Aiken grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party Bicep grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party Gleam grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party L4 grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party Magik grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party Prisma grammar to supported languages.

    11.11.2release notes

  • Adds the 3rd party VoltScript grammar to supported languages.

    11.11.2release notes

  • Adds the "vs Dark " theme.

    11.11.2release notes

Behavior and default changes 22

  • Adds the block and endblock keywords to CMake highlighting.

    11.12.0release notes

  • Supports digit separators in binary literals and numeric type suffixes, and no longer highlights an identifier's leading underscore.

    11.12.0release notes

  • Adds highlighting for corner-shape properties.

    11.12.0release notes

  • CSS highlighting now supports six-digit unicode-range values.

    11.12.0release notes

  • Adds highlighting for class and function names.

    11.12.0release notes

  • Highlights registered CAA property tags.

    11.12.0release notes

  • Improves highlighting for character strings, TXT records, classes, escapes, and addresses.

    11.12.0release notes

  • Updates the Gherkin keyword list.

    11.12.0release notes

  • Gherkin docstrings can now use backticks.

    11.12.0release notes

  • Recognizes binary integer literals.

    11.12.0release notes

  • Supports underscores in numeric literals.

    11.12.0release notes

  • Adds self to the built-in variables recognized by JavaScript highlighting.

    11.12.0release notes

  • Supports block C-style comments.

    11.12.0release notes

  • Adds the Lua 5.5 global keyword to highlighting.

    11.12.0release notes

  • Enhances NSIS highlighting rules.

    11.12.0release notes

  • Adds support for highlighting t-strings.

    11.12.0release notes

  • Adds the safe keyword to Rust highlighting.

    11.12.0release notes

  • Parses f16 and f128 literals.

    11.12.0release notes

  • Updates SQF highlighting to Arma 3 v2.22.

    11.12.0release notes

  • The build now allows third-party packages to override default languages.

    11.12.0release notes

  • Adds the parallel keyword and allows [] for Ada 2022.

    11.11.2release notes

  • Adds JSON5 support to the JSON grammar.

    11.11.2release notes

Fixes and other changes 32

  • C highlighting now matches only actual atomic_* type names, not C11 atomic functions.

    11.12.0release notes

  • Angle-bracket header strings are now scoped to #include directives.

    11.12.0release notes

  • A raw string's closing delimiter no longer swallows quotes.

    11.12.0release notes

  • Only standalone numbers are highlighted; digits beginning identifiers such as 3rdparty are not.

    11.12.0release notes

  • Angle-bracket header strings are now scoped to #include directives.

    11.12.0release notes

  • A raw string's closing delimiter no longer swallows quotes.

    11.12.0release notes

  • Numeric literals now require a preceding word boundary, preventing digits inside identifiers from being highlighted as numbers.

    11.12.0release notes

  • Integer division with // is no longer treated as a regex literal.

    11.12.0release notes

  • Highlights where in GADT and closed type-family declarations.

    11.12.0release notes

  • Improves type detection, including generic and array types.

    11.12.0release notes

  • Fixes a bug in Leaf keyword highlighting.

    11.12.0release notes

  • Preserves highlighting after quoted multiplication expressions.

    11.12.0release notes

  • Thematic breaks made of *** or ___ are no longer treated as the start of bold text.

    11.12.0release notes

  • The Mode.keywords type now allows RegExp.

    11.12.0release notes

  • Parser rewriting now counts named capture groups when rewriting backreferences, fixing incorrect backreference handling.

    11.12.0release notes

  • Adds the aiter, anext, frozendict, and sentinel builtins to Python highlighting.

    11.12.0release notes

  • Correctly highlights lazy import syntax from PEP 810.

    11.12.0release notes

  • The scope resolution operator :: is no longer treated as a symbol.

    11.12.0release notes

  • Includes the raw borrow operator in Rust keywords.

    11.12.0release notes

  • Allows function invocations whose names start with a keyword.

    11.12.0release notes

  • Recognizes \\ and \" character-literal escapes so highlighting does not leak.

    11.12.0release notes

  • Matches periods as part of shell prompts.

    11.12.0release notes

  • Excludes keywords from function calls when highlighting C++.

    11.11.2release notes

  • Adds support for digit separators.

    11.11.2release notes

  • Adds 7 missing directives and keywords from MDN to the CSP grammar.

    11.11.2release notes

  • Fixes unicode-range parsing.

    11.11.2release notes

  • Fixes cybertopia theme rendering in shadow DOM.

    11.11.2release notes

  • Fixes unified diff hunk header matching to allow unpaired numbers.

    11.11.2release notes

  • Fixes illegal handling at the end of input code.

    11.11.2release notes

  • Adds support for the ?' character literal and the missing defguardp keyword.

    11.11.2release notes

  • Correctly highlights 'for await' again.

    11.11.2release notes

  • Supports single-line and hash comments in attributes, constructors, and functions.

    11.11.2release notes