Fix #196: README HTML block to markdown #198

Merged
crueber merged 1 commit from fix/issue-196 into main 2026-09-08 15:08:25 +00:00
Owner

Fixes #196 — README.MD contained two embedded HTML blocks; now pure markdown.

Change (README.MD only)

  • Screenshot <p align=center> block → three stacked [![alt](src)](href) paragraphs (blank-line separated).
  • Caption <p><sub>…</sub></p> → italic *…* line (renders <em>, keeps the caption distinction).
  • Alt text and href/src targets byte-identical to the old block. All three docs/img/*.png files verified present in the repo.

Documented choices

  • Stacked, not a 3-column image table: a GFM table would still render each image at full column width (no width attr survives the pinned DOMPurify gate either way), so a table buys no layout and costs source readability. Stacked paragraphs render well in both themes (screenshots below).
  • `width="32%" is lost — markdown has no width equivalent and the sanitizer allowlist has no width/size attr. Images now render at the pipeline image max-width, stacked vertically. Only visual consequence; links/alt text unchanged.
  • Link behavior unchanged: hrefs are byte-identical relative paths, so the #182/#185 resolver treats them exactly as before — img src goes to the raw-bytes endpoint (images load), link goes to the in-app blob view with raw one click away.

Other HTML occurrences (report only, out of scope — not touched)

  • docs/go/12_web_ui.md:34 — <div id="root"></div> inside a fenced html block documenting web/index.html; not rendered HTML.
  • Everything else repo-wide is inline code spans (route patterns, mermaid breaks inside fences, tag mentions in prose) — no other rendered HTML blocks. Follow-up (if wanted): decide whether fenced/inline mentions count under a stricter reading of #196.

Verification

  • node --test web/test/unit/*.test.js: 397/397 pass (no test pins README content; checked).
  • Marked-layer check: replacement renders to <p><a><img></a></p> x3 plus <p><em> caption; tags (p/a/img/em) and attrs (href/src/alt) all inside PURIFY_CONFIG; no raw HTML in output.
  • Real Chromium (hub :9222) against a live server serving a repo with the new README plus pngs, via canonical host walgit.localhost: all 3 images load (naturalWidth 2560) in dark AND light, all 3 links navigate to the blob view, italic caption readable in both themes, zero console errors, zero failed requests (screenshots: tree dark/light, blob dark).
  • gofmt -l clean (no Go changes). No dependency, compose, or doc changes.
Fixes #196 — README.MD contained two embedded HTML blocks; now pure markdown. ## Change (README.MD only) - Screenshot `<p align=center>` block → three stacked `[![alt](src)](href)` paragraphs (blank-line separated). - Caption `<p><sub>…</sub></p>` → italic `*`…`*` line (renders `<em>`, keeps the caption distinction). - Alt text and href/src targets byte-identical to the old block. All three `docs/img/*.png` files verified present in the repo. ## Documented choices - **Stacked, not a 3-column image table:** a GFM table would still render each image at full column width (no `width` attr survives the pinned DOMPurify gate either way), so a table buys no layout and costs source readability. Stacked paragraphs render well in both themes (screenshots below). - **`width="32%" is lost** — markdown has no width equivalent and the sanitizer allowlist has no width/size attr. Images now render at the pipeline image max-width, stacked vertically. Only visual consequence; links/alt text unchanged. - **Link behavior unchanged:** hrefs are byte-identical relative paths, so the #182/#185 resolver treats them exactly as before — img src goes to the raw-bytes endpoint (images load), link goes to the in-app blob view with raw one click away. ## Other HTML occurrences (report only, out of scope — not touched) - `docs/go/12_web_ui.md:34` — `<div id="root"></div>` inside a fenced html block documenting `web/index.html`; not rendered HTML. - Everything else repo-wide is inline code spans (route patterns, mermaid breaks inside fences, tag mentions in prose) — no other rendered HTML blocks. Follow-up (if wanted): decide whether fenced/inline mentions count under a stricter reading of #196. ## Verification - `node --test web/test/unit/*.test.js`: **397/397 pass** (no test pins README content; checked). - Marked-layer check: replacement renders to `<p><a><img></a></p>` x3 plus `<p><em>` caption; tags (p/a/img/em) and attrs (href/src/alt) all inside `PURIFY_CONFIG`; no raw HTML in output. - **Real Chromium (hub :9222) against a live server** serving a repo with the new README plus pngs, via canonical host `walgit.localhost`: all 3 images load (naturalWidth 2560) in dark AND light, all 3 links navigate to the blob view, italic caption readable in both themes, **zero console errors, zero failed requests** (screenshots: tree dark/light, blob dark). - `gofmt -l` clean (no Go changes). No dependency, compose, or doc changes.
Three linked screenshots become stacked [![alt](src)](href) paragraphs;
the <sub> caption becomes an italic line. Alt text and href targets are
byte-identical; width="32%" has no markdown equivalent (images now render
at the pipeline's max-width, stacked). Verified through render-md.js:
marked emits <a><img></a> with img src resolved to the raw endpoint and
href to the in-app blob view per #182/#185; all tags/attrs survive the
pinned DOMPurify gate.
Sign in to join this conversation.
No description provided.