elixir-makeup/makeup
66.9
Adequate · 18 September 2026
2.8k
lines of production code
Elixir
primary language
1
measurement over time
What this system is
This system is a syntax highlighting library for Elixir that tokenizes source code and generates styled HTML output. It features a registry-based architecture that allows for dynamic lexer registration and extensibility, enabling third-party packages to add support for new languages without modifying the core. The library provides a flexible styling engine with customizable HTML tags and CSS classes, replacing previous macro-heavy implementations with a more modular and performant parsing backend.
Features
Dynamic lexer registration via a central registry
Makeup now supports dynamically registering lexers through a central registry system. On application start, name and extension registries are initialized, allowing new lexers to be added at runtime by associating them with language names (e.g., "elixir") and file extensions (e.g., "ex"). This enables projects like ExDoc to extend syntax highlighting support by simply depending on additional lexer libraries without requiring code changes to the core Makeup library. The registry provides APIs to query supported languages and extensions, and to fetch or register lexers by name or extension.
lib/makeup · high confidence
Removals
Removal of Pygments HTML style modules
The library has removed the individual Elixir modules that defined Pygments-style HTML syntax highlighting (such as Abap, Algol, Arduino, Monokai, and Tango). Users relying on these specific named styles for code highlighting will no longer have access to them in this release.
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 improve modularity and reduce the core library's footprint, though the specific parsing rules and tokenization behavior for these languages remain defined within the new package structures.
lib/makeup/lexers · high confidence
Behavioural changes
HTML formatter now supports custom highlight tags and group highlighting
The HTML formatter has been updated to allow users to specify a custom HTML tag (defaulting to 'span') for highlighting code tokens, replacing the previous hardcoded behavior. Additionally, a new JavaScript snippet is included to enable interactive highlighting of matching code groups (such as delimiters) on mouseover, leveraging new 'data-group-id' attributes in the generated HTML. The previous simple HTML formatter implementation 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 registry, and styling features; 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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Baseline
- First survey — no prior run to compare against. CAI 67.
Lenses
- Code Health 98
- Architecture 100
- Maturity 49
- Readiness 67
- Security 99
Changes since last survey
- 129 commits — 113 feature/other, 16 fixes
By area
- (root) — 68 commits
- lib/makeup — 38 commits
- (repo) — 8 commits
- .github/workflows — 4 commits
- lib/makeup.ex — 3 commits
- test/helpers — 3 commits
- config/config.exs — 1 commit
- test/html_formatter_test.exs — 1 commit
- test/lexer — 1 commit
- test/makeup_test.exs — 1 commit
- test/registry_test.exs — 1 commit
Notable commits
- fix: Fix
- fix: Fix compilation warnings in Elixir 1.20 (#72)
- fix: Fix doc highlighting
- fix: Fix failed GitHub workflow for makeup (#73)
- fix: Fix link to CONTRIBUTING from README
- fix: Fix test that was not running
- fix: Fix type definition (#60)
- fix: Fix warnings on recent Elixir versions
- fix: bumped ex_spirit version due to upstream bug
- fix: fix changelog
- fix: fix links to style examples (#46)
- fix: fix test lexer
- fix: fixed changelog file
- fix: fixed spec in behaviour
- fix: fixed unicode handling bugs
- fix: nimble_parsec is an advantage! fix the link (#35)
- change: Add GitHub Action CI (#44)
- change: Add a link to makeup_syntect to the README (#69)
- change: Add dracula theme style (#59)
- change: Add missing :eex dependency
- …and 109 more
Written by watchdog.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 18 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 5220946a5e918155ef38c2437b8bc8d392c06b9a — the exact code this score is about.
- Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-5d04157a340d.