Skip to content
CAI
Software that uses CAICheck a score

leandrocp/mdex

71.8

Strong · 15 November 2026

9.3k

lines of production code

Elixir

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Add index and selector-based access to document nodes

Users can now retrieve, modify, and remove specific nodes within a Markdown document using integer indices, node type atoms, structs, or custom functions. This change introduces the \MDEx.Document.Access\ module, which implements \fetch\, \get\_and\_update\, and \pop\ behaviors, supported by a new \MDEx.Document.Traversal\ module for recursive tree traversal and updates.

lib/mdex/document · high confidence

Introduce usage rules and developer tooling configuration

This release adds a \usage-rules.md\ guide to help developers and coding agents choose the correct MDEx API for their needs, such as using the \\~MD\ sigil for static content or \MDEx.to\_html!/2\ for runtime content. It also introduces new configuration files to standardize the development environment: \.coderabbit.yaml\ to skip automated reviews for release PRs, \.credo.exs\ to enforce strict linting and a cyclomatic complexity ceiling of 9, and a \Dockerfile\ for reproducible local debugging. Additionally, the \.formatter.exs\ line length is increased to 150 characters to align with the linter, and the \test.md\ file is removed.

(repo-wide) · high confidence

New documentation guides for code block decorators, HEEx integration, and migration

Added new guides to the documentation: \code\_block\_decorators.md\ explains how to use Lumis syntax highlighting options (like themes and line highlighting) in code blocks; \heex.md\ details integrating MDEx with Phoenix LiveView templates using the \\~MD\[...\]HEEX\ sigil and \to\_heex/2\; \earmark\_to\_mdex.livemd\ provides a migration guide from Earmark to MDEx; and \compilation.md\ covers native dependency setup, including Lumis parser installation and pre-compiled binaries.

guides · high confidence

New example notebooks for MDEx features

Added a comprehensive set of Livebook examples demonstrating MDEx capabilities, including syntax highlighting with Lumis and Syntect, custom and light/dark themes, code block decorators, and custom codefence renderers for Pikchr, SVG charts, and Mermaid diagrams. The examples also cover GitHub Flavored Markdown, Phoenix LiveView HEEx integration, document tree traversal for word highlighting, streaming output, and integration with NimblePublisher.

examples · high confidence

Removals

Removal of native comrak NIF module

The native Rust implementation for Markdown processing (comrak\_nif) has been removed from the codebase. This deletes the Erlang NIF bindings that previously exposed the \to\_html\ and \to\_html\_with\_options\ functions, along with the associated Elixir structs (\MDEx.ExtensionOptions\, \MDEx.ParseOptions\, \MDEx.RenderOptions\, \MDEx.Options\) and the \ListStyleType\ enum, effectively stripping the native rendering capability from this specific location.

_native/comrak\nif · high confidence

Behavioural changes

4 commits (0 fixes) modifying assets

A change to existing behaviour in assets — 4 commits, 83 files: “sponsor (\#277)”; “add logo and icons, and improve docs”; “chore: update logo (\#151)”; and 1 more (refs \#277, \#151, \#476).

assets · medium confidence · unverified

7 commits (0 fixes) modifying benchmarks

A change to existing behaviour in benchmarks — 7 commits, 6 files: “bench: compare MDEx and mdex\_native call by call”; “bench: record latest results for every library”; “bench: count Earmark's warnings as output and read markerl's chardata”; and 4 more.

benchmarks · medium confidence · unverified

Configures Lumis as the syntax highlighter for mdex\_native

The application now uses the Lumis library for syntax highlighting within the mdex\_native component, as defined in the new config/config.exs file.

config · high confidence

MDEx restructures core engine with new Document AST and converter modules

The library introduces a unified \%MDEx.Document\ struct as the central representation for Markdown, replacing the previous options and native module structures. This change brings in dedicated converter modules for Quill Delta (\MDEx.DeltaConverter\) and Slack mrkdwn (\MDEx.SlackConverter\), alongside a new \MDEx.ComrakConverter\ for AST translation. The \MDEx.FragmentParser\ is updated to handle streaming and incomplete link completion more robustly, while the \MDEx.Sigil\ module now supports HEEx modifiers for Phoenix LiveView components. The old \MDEx.Native\ and \MDEx.Options\ modules have been removed in favor of this new architecture.

lib/mdex · high confidence

Major API overhaul with AST-based parsing and new output formats

The library has been refactored to introduce \MDEx.Document\ as the core engine, replacing the previous direct conversion functions with a structured AST approach. Users can now parse Markdown into an inspectable \MDEx.Document\ struct (inspired by Floki) and manipulate it programmatically before rendering. This change introduces new \to\\\ functions (HTML, CommonMark, JSON, XML, Slack) and a \use MDEx\ macro that enables the \\~MD\ sigil and LiveView HEEX support. Additionally, the public API now exposes plugin support, custom syntax highlighter engines, and granular options for sanitization and auto-closing, while deprecating the old default option getters in favor of \MDEx.Document\ equivalents.

lib · high confidence

Test coverage

Added comprehensive test coverage for MDEx core components; Expanded test suite for syntax highlighting, sanitization, and document handling.

Dependencies

MDEx v0.14.1: Native engine migration and dependency overhaul

This release upgrades the project to version 0.14.1 and raises the minimum Elixir requirement to 1.15. The native Rust component has been refactored: the local \comrak\_nif\ crate (previously using comrak 0.18 and rustler 0.29) is removed in favor of the external \mdex\_native\ hex package (v0.2.10), which manages its own Rust dependencies (rustler 0.32, rustler\_precompiled 0.8). The Elixir side now depends on \nimble\_options\, \nimble\_parsec\, and \jason\, while dev dependencies like \ex\_doc\ and \earmark\_parser\ are updated to their latest versions.

(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 72 → 72 (-0.3)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 97 → 97 (-0.5)
  • Architecture 100 → 100 (+0.0)
  • Maturity 69 → 69 (+0.0)
  • Readiness 63 → 63 (+0.1)
  • Security 82 → 80 (-2.3)
  • Performance 95 → 95 (+0.0)

Resolved (4)

  • Outdated: floki
  • Rotate the exposed credentials — git history can't be un-committed
  • Secret: generic-api-key (examples/syntax_highlight.livemd)
  • Secret: generic-api-key (examples/syntax_highlight.livemd)

New (4)

  • Edited copies of one member (3 members, 15+ corresponding lines) (lib/mdex/document/access.ex)
  • Edited copy of a member (10 corresponding lines) (lib/mdex/delta_converter.ex)
  • Edited copy of a member (14 corresponding lines) (lib/mdex/document/access.ex)
  • Edited copy of a member (20 corresponding lines) (lib/mdex/delta_converter.ex)

Changes since last survey

  • 25 commits — 24 feature/other, 1 fixes

By area

  • (root) — 15 commits
  • benchmarks/benchmark.exs — 3 commits
  • benchmarks/RESULTS.md — 2 commits
  • lib/mdex — 2 commits
  • assets/brand — 1 commit
  • benchmarks/inputs — 1 commit
  • test/mdex — 1 commit

Notable commits

  • fix: fix: MDEx.stream crash on fence lines inside an open fence
  • change: Add agent skills (mdex, mdex-write-plugin) (#479)
  • change: Move from justfile to mise
  • change: bench: benchmark every Elixir/Erlang Markdown library in isolation
  • change: bench: compare MDEx and mdex_native call by call
  • change: bench: count Earmark's warnings as output and read markerl's chardata
  • change: bench: record latest results for every library
  • change: bench: record results before and after the MDEx overhead work
  • change: bench: rewrite the benchmark with vendored inputs and paired rows
  • change: bench: run every library in two rounds and keep each row's lower median
  • change: chore(deps): bump nimble_options from 1.1.1 to 1.2.0 (#482)
  • change: chore(deps-dev): bump floki from 0.38.4 to 0.38.5 (#478)
  • change: chore(deps-dev): bump lumis_wasm_elixir from 0.26.8 to 0.26.10 (#481)
  • change: chore(deps-dev): bump lumis_wasm_rust from 0.26.4 to 0.26.7 (#483)
  • change: chore: release v0.14.6 (#475)
  • change: chore: release v0.14.7 (#477)
  • change: deps: update mdex_native 0.3.2 (#484)
  • change: docs: Add MDEx brand kit (logo, icons, banners, social preview, tokens) (#476)
  • change: docs: add arcana to Used By
  • change: feat: add a parse memory limit option (#472)
  • …and 5 more

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

leandrocp/mdex 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 b7ca06d790ab78b22436e043480610507b04336c — 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.65+preprod-3c33c1882dc1.