Skip to content

Improve post Markdown and fullscreen Sixel images - #31

Merged
merefield merged 3 commits into
masterfrom
feat/rich-post-markdown
Nov 19, 2026
Merged

merefield merged 3 commits into
masterfrom
feat/rich-post-markdown

Conversation

@merefield

@merefield merefield commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Render post Markdown with terminal styling for bold, italic, strikethrough, and inline code. Headings use bold text and distinct markers by level, block quotes use vertical bars, and task lists use checkbox glyphs. Wrapped lines keep their styling when scrolled independently.

Top-level tables use aligned columns when they fit and switch to labeled rows in narrow panes. Links show their destinations and stay clickable when enabled.

Pressing x on terminals that use fullscreen Sixel could show a blank pane or an image outside its border. Draw the frame before sending the Sixel raster, then fit and center the raster using the terminal's reported cell size. This applies to Sixel output from both Chafa and ImageMagick.

make check passed with Go 1.27.4. Regression tests cover Markdown styles and tables, Sixel draw order, and raster placement within the pane. Portrait, landscape, and square fixtures fit the pane with both encoders.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are present, and the change is supported by expanded coverage for Markdown styling, links, wrapping, and responsive table layouts.

No open issues 🎉

What changed in this PR

This PR replaces the previous Glamour-only post rendering path with a custom Markdown pipeline that adds terminal styling, responsive table layouts, and reliable hyperlink handling across wrapped lines.

Changes:

  • Added styled rendering for headings, emphasis, strikethrough, block quotes, task lists, inline code, and links.
  • Added aligned wide-table rendering and labeled-row layouts for narrow panes with Unicode-aware sizing.
  • Preserved styles and validated hyperlinks across independently wrapped and scrolled lines.
  • Expanded tests for Markdown styles, tables, wrapping, links, and responsive layouts.
File Description
internal/​ui/​web_links.go Preserves validated hyperlinks and reapplies inline styles independently for each wrapped row.
internal/​ui/​web_links_test.go Updates hyperlink assertions for styled Markdown output and wrapped-link behavior.
internal/​ui/​ui_test.go Verifies rendered Markdown markers, visible destinations, and terminal hyperlink output.
internal/​ui/​text.go Removes the former Glamour-based text renderer and related cache implementation.
internal/​ui/​markdown.go Implements Markdown parsing, terminal styling, and responsive table layout logic.
internal/​ui/​markdown_test.go Adds coverage for Markdown styles, wrapping, table alignment and reflow, links, headings, quotes, tasks, and strikethrough.

Review effort: Lite

@merefield merefield changed the title Render rich Markdown and responsive tables in posts Improve post Markdown and fullscreen Sixel images Nov 19, 2026
@merefield
merefield merged commit 6106ca4 into master Nov 19, 2026
6 checks passed
@merefield merefield mentioned this pull request Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants