Mark: StrictMark to HTML, with enforced limits

Mark is the wiki dog: its purview is rendering StrictMark to HTML and linting it; it owns no persistent data, only the .html it emits. The goal is a lightweight, greppable wiki whose structure and size limits are enforced at build time, no host renderer. The method: drive MKDT for structure and inline tokens, generate HTML via u8b feed helpers, sanitize text and decompose links through two ragel machines, and check each page against the WikiWeb budgets — warn by default, fail under --strict.

API

Mark's public surface is small: one render entry, one inline decomposer, and the two u8b emit helpers the renderer feeds through.

CLI

mark takes files or a directory; a file renders to a sibling .html, a directory renders every .mkd in it, so a whole wiki builds in one call.

    mark page.mkd           # -> page.html beside it
    mark --strict wiki/     # build a dir, fail on any budget breach
    mark a.mkd b.mkd        # several files at once

Sanitizing and links

All text reaches HTML through ragel, never a hand-rolled byte scan, and inter-page links are rewritten so the rendered site is self-contained.

Enforced limits

mark is also the wiki linter: it checks the WikiWeb page shape and the 64-codepoint-line budgets, reporting any breach. --strict turns the first breach into a non-zero exit for CI.

Build and test

mark is a standard Dog: a static library plus a CLI, with table-driven tests. The two ragel units are pre-generated and committed alongside their sources.