From 876f7675489fe6bf81cfef1fa6053670eff83f9c Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Tue, 4 Aug 2026 12:53:01 -0400 Subject: [PATCH] feat: Added deflist markdown extension. --- AGENTS.md | 4 +- TODOS.md | 1 + flake.nix | 1 + markdown/deflists.odin | 197 ++++++++++++++++++++++++++++++++++++ markdown/deflists_test.odin | 104 +++++++++++++++++++ markdown/footnotes.odin | 18 +--- markdown/markdown.odin | 10 +- site/content/docs.md | 4 +- 8 files changed, 317 insertions(+), 22 deletions(-) create mode 100644 markdown/deflists.odin create mode 100644 markdown/deflists_test.odin diff --git a/AGENTS.md b/AGENTS.md index e77f61b..45f939b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -79,6 +79,7 @@ thor/ | | `sectionate.odin` | `wrap_sections` — splits HTML at `

` into `
` wrappers | | | `highlight.odin` | Syntax highlighting via tree-sitter. Imports `../treesitter`. | | | `heading_ids.odin` | `inject_heading_ids` — adds `id` attributes to `

`-`

` from heading text. Slug-based, deduplicated. | +| | `deflists.odin` | `convert_deflists` — pre-cmark pass. Scans for definition list patterns (`term\n\n: definition`) and converts to `
` HTML blocks. Terms and definitions rendered through cmark individually for inline markdown. Consecutive pairs grouped into single `
`. | | | `toc.odin` | `generate_toc(html, allocator)` — page-level feature (not a pipeline extension). Scans `

`-`

` for IDs (after `inject_heading_ids`), builds nested `