# What changed in highlight.js

> 84 changes in highlight.js 11 from its official release notes, upgrade guides and advisories: 1 breaking, 3 security, 26 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/highlight.js/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## highlight.js 11

### Breaking changes

- Gherkin variables no longer allow whitespace. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)

### Security

- Bounds the run of type tokens before a function name to mitigate ReDoS. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Bounds the run of type tokens before a function name to mitigate ReDoS. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Removes recursive sublanguage references to prevent ReDoS. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)

### New APIs and options

- Adds the third-party Cedar grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party DAX grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds a grammar for FreeDesktop configuration files, including .desktop and systemd files. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Djot grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds batch as an alias for the DOS grammar. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the Equinox theme. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Igor Pro grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Jaiva grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds ktm and ktx as Kotlin aliases. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Liquidsoap grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party M (Power Query) grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party MoonBit grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Pkl grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party RAScript grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Veryl grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Why3 grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the third-party Xojo grammar to the supported languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the 3rd party Abc Notation grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party Aiken grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party Bicep grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party Gleam grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party L4 grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party Magik grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party Prisma grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the 3rd party VoltScript grammar to supported languages. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds the "vs Dark " theme. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)

### Behavior and default changes

- Adds the block and endblock keywords to CMake highlighting. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Supports digit separators in binary literals and numeric type suffixes, and no longer highlights an identifier's leading underscore. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds highlighting for corner-shape properties. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- CSS highlighting now supports six-digit unicode-range values. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds highlighting for class and function names. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Highlights registered CAA property tags. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Improves highlighting for character strings, TXT records, classes, escapes, and addresses. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Updates the Gherkin keyword list. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Gherkin docstrings can now use backticks. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Recognizes binary integer literals. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Supports underscores in numeric literals. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds self to the built-in variables recognized by JavaScript highlighting. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Supports block C-style comments. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the Lua 5.5 global keyword to highlighting. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Enhances NSIS highlighting rules. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds support for highlighting t-strings. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the safe keyword to Rust highlighting. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Parses f16 and f128 literals. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Updates SQF highlighting to Arma 3 v2.22. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- The build now allows third-party packages to override default languages. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the parallel keyword and allows [] for Ada 2022. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds JSON5 support to the JSON grammar. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)

### Fixes and other changes

- C highlighting now matches only actual atomic_* type names, not C11 atomic functions. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Angle-bracket header strings are now scoped to #include directives. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- A raw string's closing delimiter no longer swallows quotes. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Only standalone numbers are highlighted; digits beginning identifiers such as 3rdparty are not. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Angle-bracket header strings are now scoped to #include directives. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- A raw string's closing delimiter no longer swallows quotes. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Numeric literals now require a preceding word boundary, preventing digits inside identifiers from being highlighted as numbers. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Integer division with // is no longer treated as a regex literal. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Highlights where in GADT and closed type-family declarations. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Improves type detection, including generic and array types. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Fixes a bug in Leaf keyword highlighting. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Preserves highlighting after quoted multiplication expressions. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Thematic breaks made of *** or ___ are no longer treated as the start of bold text. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- The Mode.keywords type now allows RegExp. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Parser rewriting now counts named capture groups when rewriting backreferences, fixing incorrect backreference handling. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Adds the aiter, anext, frozendict, and sentinel builtins to Python highlighting. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Correctly highlights lazy import syntax from PEP 810. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- The scope resolution operator :: is no longer treated as a symbol. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Includes the raw borrow operator in Rust keywords. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Allows function invocations whose names start with a keyword. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Recognizes \\ and \" character-literal escapes so highlighting does not leak. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Matches periods as part of shell prompts. (11.12.0) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.12.0)
- Excludes keywords from function calls when highlighting C++. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds support for digit separators. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds 7 missing directives and keywords from MDN to the CSP grammar. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Fixes `unicode-range` parsing. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Fixes cybertopia theme rendering in shadow DOM. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Fixes unified diff hunk header matching to allow unpaired numbers. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Fixes illegal handling at the end of input code. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Adds support for the `?'` character literal and the missing `defguardp` keyword. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Correctly highlights 'for await' again. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
- Supports single-line and hash comments in attributes, constructors, and functions. (11.11.2) — [release notes](https://github.com/highlightjs/highlight.js/releases/tag/11.11.2)
