elixir-makeup/makeup
70.6
Strong · 15 November 2026
2.8k
lines of production code
Elixir
primary language
5
measurements over time
What this system is
This system is a syntax highlighting library for Elixir that provides a flexible framework for lexing source code and generating styled HTML output. It features a registry-based system for dynamically registering and retrieving lexers, allowing for extensible support of various programming languages. The core functionality includes parsing code into tokens, applying customizable CSS styles, and rendering the result with interactive features like group highlighting.
Features
Dynamic lexer registration via a new registry system
Makeup now supports dynamically registering lexers at runtime through a new \Makeup.Registry\ module. The application initializes name and extension registries on startup, allowing users to add support for new programming languages by registering their lexers against specific language names and file extensions. This replaces the previous static approach, enabling greater flexibility for projects like ExDoc that need to handle multiple languages. Additionally, the \Makeup.Lexer\ module has been updated to include a \split\_into\_lines\ function for tokenizing source code by line breaks and a refactored \merge\ function that correctly handles iodata token values.
lib/makeup · high confidence
Removals
Removal of Pygments HTML styles
The library has removed the entire collection of Pygments HTML syntax highlighting styles (including Abap, Algol, Arduino, Monokai, and others) from the \lib/makeup/styles/html/pygments\ directory. Users relying on these specific pre-defined styles for code highlighting will no longer have access to them.
lib/makeup/styles/html/pygments · high confidence
Architecture
Lexers moved into separate packages
The lexer implementations for Elixir and HTML5 have been removed from the main library and reorganized into their own dedicated packages. This structural change isolates language-specific parsing logic, likely to reduce the core library's footprint and allow independent versioning or distribution of the lexers.
lib/makeup/lexers · high confidence
Behavioural changes
HTML formatter refactored to support custom highlight tags and group highlighting
The HTML formatter has been replaced with a new implementation that allows users to configure the HTML tag used for highlighting tokens (defaulting to \<span\>) via the :highlight\_tag option. This change also introduces support for highlighting matching code groups on mouseover by rendering data-group-id attributes and including a JavaScript snippet for interactive group highlighting. The previous SimpleHTMLFormatter has been removed in favor of this more flexible approach.
lib/makeup/formatters · high confidence
Lexer refactored to use NimbleParsec with new combinator and grouping utilities
The lexer implementation has been migrated from the ExSpirit parser library to NimbleParsec, replacing the previous macro-heavy helper modules (such as \Makeup.Lexer.Common\ and its ASCII utilities) with a new set of functional combinators in \Makeup.Lexer.Combinators\. This change introduces new utilities for tokenizing, such as \word\_from\_list\ for matching keywords and \many\_surrounded\_by\ for delimited content, and adds \Makeup.Lexer.Groups\ to support highlighting matching delimiter pairs. Additionally, \Makeup.Lexer.Postprocess\ provides tools for converting token values to binaries for easier testing and inspection.
lib/makeup/lexer · high confidence
Migrate lexer parsing engine from ExSpirit to NimbleParsec
The core lexer implementation has switched from the ExSpirit parsing library to NimbleParsec. This change significantly reduces compilation times, which were previously lengthy due to ExSpirit's compile-time optimizations, while maintaining runtime performance. The library now requires NimbleParsec version 1.2.2 or later. This migration also resolves several Unicode handling bugs in the combinators and fixes warnings on recent Elixir versions.
(repo-wide) · high confidence
Refactored API to use options keyword list and registry-based lexer lookup
The main \Makeup.highlight/2\ function now accepts a keyword list of options instead of separate lexer and formatter arguments, allowing users to configure the lexer, formatter, and their respective options (such as \:highlight\_tag\ and \:css\_class\) in a single call. Lexer selection has shifted from direct module passing to a registry-based lookup via \Makeup.Registry\, enabling custom lexers to be registered and retrieved by name. Additionally, a new \highlight\_inner\_html/2\ function was added to provide direct access to the inner HTML bits of the formatted output, and the stylesheet generation now delegates to the HTML formatter.
lib · high confidence
Refactored style system with new TokenStyle struct and expanded style definitions
The HTML styling engine has been restructured to improve modularity and readability. A new \TokenStyle\ struct and parser (\from\_string\) now handle individual token formatting (colors, fonts, borders), allowing empty styles to be skipped in generated CSS for smaller output. The core \Style\ module was renamed and refactored, including the addition of a CSS class to prevent text selection (\user-select: none\) in highlighted blocks. Additionally, the \StyleMap\ module was significantly expanded, replacing the previous \use Const\ macro with explicit \Style.make\_style\ calls that define detailed token attributes for numerous styles (such as Abap, Algol, Arduino, and Autumn), providing richer and more granular syntax highlighting options.
lib/makeup/styles/html · high confidence
Removal of default application configuration file
The default application configuration file (config/config.exs) has been removed. This file previously provided the standard template for configuring the application and its dependencies using the Mix.Config module, including examples for setting application-specific keys and third-party app settings like the logger level. Its removal means these default configuration structures are no longer present in the project.
config · high confidence
Token type definitions migrated from macros to atoms
The token type system in \lib/makeup/token\ has been refactored to remove the \DefTokenType\ macro and the \TokenTypes\ module that previously defined token types as compile-time constants. Instead, token types are now represented as plain atoms (e.g., \:text\, \:keyword\) within the \Utils\ module. This change simplifies the token hierarchy definition, removes the dependency on the \Const\ library, and ensures reproducible compilation by sorting the standard token types.
lib/makeup/token · high confidence
Test coverage
Added lexer test fixtures and data generators; Added test coverage for HTML formatting, lexer operations, and registry; Added tests for lexer combinators.
Dependencies
Upgrade to NimbleParsec and modernize project configuration
The Makeup library replaces the legacy ExSpirit parser with NimbleParsec (v1.4), significantly improving syntax highlighting performance and reliability. This change also updates the minimum supported Elixir version to 1.12, removes several unused dependencies (such as ex\_const, exconstructor, and html\_entities), and adds stream\_data for development and testing. Users will benefit from a more robust parsing engine and a cleaner dependency tree, though they must ensure they are running Elixir 1.12 or later.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 71 → 71 (-0.4)
- Rubric changed (rubric-2026.11.1 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 99 → 96 (-2.5)
- Architecture 100 → 100 (-0.1)
- Maturity 56 → 56 (+0.1)
- Readiness 69 → 69 (+0.0)
- Security 99 → 98 (-0.7)
Resolved (2)
- Further sole-owners (lower concentration)
- Off-boarding risk: anonymized user #1
New (4)
- Edited copies of one member (3 members, 40+ corresponding lines) (lib/makeup/lexer/groups.ex)
- Off-boarding risk: anonymized user #1
- Orphaned file (lib/makeup/lexer.ex)
- Orphaned file (lib/makeup/token/utils.ex)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
elixir-makeup/makeup was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 15 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit d0631abbf4fffa57781e332a58a9d013b9aabf06 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.73+preprod-52de90b74216.