Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/facett

.nornir/widgets/facett-markdown.md

facett-markdown — design note

Status: builds (egui 0.33) + 5 tests green. In ordning/crates/widgets/facett-markdown; destined for facett.

What it is

A Markdown editor + preview for case descriptions and comments, with @mention and #tag extraction (for the host to link/notify) and highlighting. Edit/Preview toggle. A pragmatic, dependency-free renderer (no markdown crate — the subset a case uses is small; hand-rolling keeps the lean-Rust stance).

API

let mut md = Markdown::new("Description").with_text("# Title\n@maria see #regression");
md.ui(ui);                       // edit/preview
let people = md.mentions();      // ["maria"]   (unique, first-seen order, Swedish letters OK)
let tags   = md.tags();          // ["regression"]
let source = md.text();

Rendering subset

Headings (#/##/###), bullet + numbered lists, blockquotes (>), code fences (```), and inline bold, code, [text](url) links, @mention, #tag. Rendered via egui LayoutJob for mixed inline styles.

Design decisions

Move-to-facett / TODO