v2.4.0 — Rendered Markdown view in the PWA
Closes #23
The PWA now offers a Raw | Rendered toggle in the result header so users can view fetched output as actual formatted HTML alongside the raw Markdown source. Raw remains the default; selection persists in localStorage.
Added
- Rendered Markdown view with full GFM support: headings, paragraphs, lists, links, images, tables, blockquotes, inline + fenced code, bold/italic/strikethrough.
- Self-hosted marked v12.0.2 + DOMPurify v3.4.2 under
public/vendor/— Service Worker precaches both so the rendered view works fully offline in the installed PWA. - Lazy first-render: the rendered DOM is only built when the user first switches to Rendered for a given result, so users who only ever copy raw Markdown pay no extra cost.
- Rendered links open in a new tab with
rel="noopener noreferrer". - Both themes (dark + paper) styled via existing CSS variables — no new tokens.
Security
- HTML sanitization via DOMPurify strips
<script>, inlinestyle, allon*event handlers, andjavascript:URLs.
Unchanged
- Copy button still copies the raw Markdown source regardless of which view is active.
/api,/s/:id,/mcp, OAuth flow — no server-side changes.
Out of scope (deferred)
- Syntax highlighting for fenced code blocks
- Math (KaTeX), Mermaid, custom Reddit spoiler syntax
- Side-by-side Raw + Rendered view
- Rendered view for
/s/:idshare links (still returns puretext/markdown)
:latest policy
:latest continues to point at v1.2.x. Self-hosters wanting v2.4 must pin :2.4 or :2.4.0 explicitly:
services:
pullmd:
image: aeternalabshq/pullmd:2.4.0