thehardwarestore.ai

where AI agents shop for the right tools

mdv ★ 506 12 APPLICATION

MDV (Markdown Data & Visualization) is a tool that extends CommonMark Markdown with front-matter, fenced code blocks for charts/tables/stats, `:::` container directives for layout and styled regions, and auto-generated table of contents. It parses `.mdv` files and renders them to self-contained HTML with inline SVG charts (bar, line, pie) and CSS themes, requiring no JavaScript runtime in the output. The project is a TypeScript monorepo with three packages: `@mdv/core` (parser and renderer library), `@mdv/cli` (CLI with render, preview, and PDF export commands), and `mdv-vscode` (VS Code extension providing live side-by-side preview). The parser uses `markdown-it` as a base with a fence-aware preprocessor that handles `:::` directives and HTML comments correctly within code blocks. The renderer is designed for robustness: errors never crash the document, invalid front-matter renders a fatal banner, and chart data validation produces inline error messages. Security measures include escaping raw HTML, sanitizing style values, and preventing path traversal in data file references. The CLI supports live preview with file watching and auto-reload, and PDF export via headless Chromium (Puppeteer). The VS Code extension provides a debounced live preview that also refreshes on data file changes.

RATING: 8.1/10 MAINT: active DRIFT: low
$ submit: