From fb765fc83bfa3339b15cded6a7108eb78675ed37 Mon Sep 17 00:00:00 2001 From: Spencer Brower <6729162+sbrow@users.noreply.github.com> Date: Wed, 5 Aug 2026 17:38:39 -0400 Subject: [PATCH] refactor: Moved diagnostic code into its own package. --- AGENTS.md | 4 +- diagnostics/diagnostics.odin | 279 ++++++++++++++++++++++++++++++ diagnostics/diagnostics_test.odin | 111 ++++++++++++ mustache/diagnostic.odin | 279 ++++-------------------------- mustache/diagnostic_test.odin | 120 ++----------- mustache/mustache.odin | 18 +- mustache/pipes.odin | 4 +- mustache/suggest.odin | 28 +-- mustache/suggest_test.odin | 28 +-- render.odin | 12 +- site/content/docs.md | 42 ++++- 11 files changed, 509 insertions(+), 416 deletions(-) create mode 100644 diagnostics/diagnostics.odin create mode 100644 diagnostics/diagnostics_test.odin diff --git a/AGENTS.md b/AGENTS.md index 3026156..cb41f00 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,6 +32,7 @@ thor/ ├── treesitter/ # FFI types + grammar management (standalone package) ├── markdown/ # Content transformation pipeline (imports ../treesitter) ├── mustache/ # Template engine with lambdas + pipe filters + diagnostics +├── diagnostics/ # Shared diagnostic utilities (suggest_correction) ├── content.odin # Page struct, Pending_File, scan_content_files, collect_languages, load_page ├── render.odin # Template rendering, Template_Context, sort_pages, RSS, sitemap ├── menus.odin # Menu_Entry, DEFAULT_WEIGHT, build_menus, collect_auto_menus, merge_page_menus, parse_page_menus, parse_config_menus @@ -82,6 +83,7 @@ thor/ | | `deflists.odin` | `convert_deflists` — pre-cmark pass. Scans for definition list patterns (`term\n\n: definition`) and converts to `
| Format | +Time zone | +
|---|---|
2023-10-15T13:18:50-07:00 |
+America/Los_Angeles |
+
2023-10-15T13:18:50-0700 |
+America/Los_Angeles |
+
2023-10-15T13:18:50Z |
+Etc/UTC |
+
2023-10-15T13:18:50 |
+Default is local system time | +
2023-10-15 |
+Default is local system time | +
15 Oct 2023 |
+Default is local system time | +