Rendered markdown: relative links/images broken + prose CSS pass #182
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub#182
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Rendered markdown: relative links/images broken + prose CSS pass
On a rendered README (e.g.
/crueber/walhubtree view): the three![...]screenshots show as broken-image icons, and relative links don't navigate anywhere sensible.Root cause (to verify in code)
The renderer emits
src/hrefverbatim. Relative references (shots/a.png,docs/b.md) resolve against the SPA route URL → 404/HTML. Absolute URLs are fine.Fix
Resolve relative references at render time against the file's own location (repo + ref + dir):
.md/markdown files → the in-app blob view for that path at the same ref (consistent with the tabs feature).#frag), absolutehttp(s):,mailto:→ untouched.#quick-start) should scroll within the rendered view if cheap; otherwise leave as-is and note it.Prose CSS pass
Style the rendered markdown to take advantage of the new renderer: heading scale/spacing, code blocks + inline code (both themes), tables (borders/padding/header), blockquotes, lists (incl. nested + task-list checkboxes),
hr, images (max-width:100%, block margin), link colors. Both themes, no new deps.Acceptance criteria
node --testgreen (URL-resolution unit tests + existing suite); browser check of a doc-heavy README both themes, zero console errors, zero broken images.Fixed by #183 (branch fix/issue-182, against main — not merged). Relative src/href now resolve at render time against {owner, repo, ref, dir} (images/other → ?raw endpoint, .md → blob view; anchors/schemes untouched; threads pass no ctx — documented), plus the prose CSS pass both themes. Proof: node --test 378/378 green; real-Chromium pass on a live server (README both themes, md→blob nav, sub-doc dir base, release tag base, zero console errors, zero broken images). One notable find: Solid drops a
refprop on components, so the tab context prop isdocRef; andurls.rawbuilt a /raw route that never existed (404) — now the §9.5 ?raw shape.Review of PR #183 (fix/issue-182, verified at
054daf3in scratch worktree /tmp/pr183, since removed).VERDICT: ready to merge (no browser pass per task instructions — Chromium proof of DOMPurify enforcement + prose rendering still owed by the author).
WHAT I VERIFIED
d4d4780vs origin/main808ba98) — the notify/pulls test diffs in a naive main...branch diffstat belong to #179/#181, not this PR. PR-only commit is396cae3(+ my054daf3below).REVIEW FIX PUSHED (
054daf3, 1 line): renderBody duplicated the marked.parse+resolveMarkdownUrls pipeline instead of calling renderMarkdownHtml(src, ctx) — behavior-identical dedup, removes drift risk between the Node-tested layer and the browser gate. Re-tested (378/378) + rebuilt after the fix.NOT VERIFIED (waived): real-Chromium pass (DOMPurify drop enforcement, both-themes prose render, zero console errors, md->blob navigation) — author must confirm before merge.
Fixed by PR #183 incl. review dedup fixup (relative URLs resolved + gated by sanitizer, dead raw route fixed, prose CSS; 378/378 node tests), merged. Closing.