CodeMirror 5 change handlers receive (instance, changeObj). The handler named the first argument change, so once the fold gutter populated __mdpFenceCache it threw on change.from.line before setDirty(true). Edits after the first autosave stayed clean: Ctrl+S and Ctrl+E skipped saving and the preview stayed stale. Use the correct signature, return early for remote setValue, and guard the cache update. Add a page regression test.
- assets/page/{page.html,page.css,page.js} now hold the UI. build_page only
fills __MDP_*__ placeholders, so editing the page no longer means escaping
braces inside a format! string. Output was verified byte-identical for the
home page, a math/mermaid document and the startup page.
- src/markdown.rs: md -> html pipeline (GFM, AI-output dialect, front matter,
embedded images, ==highlight==, heading ids).
- src/page.rs: page assembly.
- src/escape.rs: shared JS/HTML escaping.
- src/main.rs drops from 5535 to 3709 lines. No behavior change; 62 tests.