diff --git a/.agents/phases/todo/180_markdown_inline_links_images/00_phase.md b/.agents/phases/todo/180_markdown_inline_links_images/00_phase.md new file mode 100644 index 0000000..6e36448 --- /dev/null +++ b/.agents/phases/todo/180_markdown_inline_links_images/00_phase.md @@ -0,0 +1,54 @@ +# Phase 180 — Markdown inline links, inline images, and the full heading ladder + +**Source:** `TODO.md` L4 ("Markdown [links](some-address) aren't being render correctly and show up as plain text"), L5 ("Quad-level headers (####) aren't being rendered and show up as plain text") and the in-answer half of L3 ("Need SVG render support on the front end when citing … source") +**Story:** n/a (TODO-derived phase, Protocol B append — owner roadmap confirmation 2026-10-14) +**Context:** `frontend/assets/markdown.js` — the SHARED escape-first renderer used by all three pages (`index.html` chat bubbles + thinking, `document.html` viewer, `shared.html`) and by `document-modal.js` through `document.js`'s `renderDocument`. Pipeline order: step 1 fence protection (`\u0000CODE n\u0000`) → step 1b GFM pipe-table protection (`\u0000TABLE n\u0000`, phase 44) → step 2 `text = inline(escapeHtml(text))` → step 2b blockquotes (phase 138) → step 3 the paragraph pass (split on `\n{2,}`, block guard `/^<(h\d|ul|ol|pre|li|blockquote)/`) → step 4 restore. The `inline(s)` chain (the single source of every inline transform, also applied per table cell) is today, in order: code span → `**strong**` → `*em*` → `^### `→`

` → `^## `→`

` → `^# `→`

` → `^\s*[-*] `→`
  • ` → `