summaryrefslogtreecommitdiff
path: root/Hutch/Views/Repositories/MarkdownHTMLRenderer.swift
Commit message (Collapse)AuthorAgeFilesLines
* Add multi-language syntax highlighting (#16)Christian Cleberg31 hours1-3/+16
| | | | | | | | | | | | | | | | | Splash (Swift-only, since removed) left code rendering unhighlighted everywhere. Add Highlightr (highlight.js) behind a small SyntaxHighlighter service and use it on both surfaces: - Native file viewer: highlight NSAttributedString by language inferred from the filename, picking a light/dark theme from the trait style and re-highlighting on style changes. Falls back to plain text for unknown languages or very large files. - Markdown/org code blocks in the WKWebView (READMEs, tickets, comments): the web view disables JavaScript, so highlight server-side into inline color-styled spans. The color scheme is now part of the render/cache key since colors are baked into the HTML. Covered by unit tests for language mapping and highlighted output.
* fix: fixes dead relative links in md/org with a new single-file viewer when ↵Christian Cleberg2026-04-151-5/+14
| | | | | | tapped Fixes: https://todo.sr.ht/~ccleberg/hutch/63
* feat(markdown): finalize migration to apple/swift-markdown rendererv2.5.0Christian Cleberg2026-03-301-4/+38
|
* Migrate README markdown rendering to swift-markdown and fix badge imagesChristian Cleberg2026-03-301-0/+206
- replace the hand-rolled markdown parser with a MarkupVisitor renderer - keep the org-mode rendering path and shared sanitization helpers intact - update WKWebView styling and height measurement for README content - fix linked image and query-string badge rendering in markdown output - expand README rendering tests and add markdown syntax coverage Implements: https://todo.sr.ht/~ccleberg/Hutch/2