Skip to content

feat: add Markdown rendering moved from relay-chat - #5

Merged
autoantohaki merged 5 commits into
mainfrom
feat/markdown
Oct 22, 2026
Merged

autoantohaki merged 5 commits into
mainfrom
feat/markdown

Conversation

@autoantohaki

Copy link
Copy Markdown
Member

Requested by mau

Before: Markdown rendering lived only in relay-chat (src/ui/markdown), tied to ChatTheme. List items, quotes and headings showed ** and backticks literally, ordered lists always restarted at 1, 2 * 3 * 4 turned into italics, and pipe tables showed as raw text.

After: Markdown in relay-ui renders headings, paragraphs, lists, quotes, fenced code, pipe tables and rules, with bold, italics, strikethrough, inline code and links inside all of them. Ordered lists keep their start number and right-align numbers past 9, indented lines continue the list item above, links whose text is the address show once, and tables are drawn with Table so they line up and fit the width. An unclosed fence still renders as code, as relay-chat needs while a reply streams. InlineText, CodeBlock, parseMarkdownBlocks and parseInline are exported on their own.

How: the parser is relay-chat's, extended with tables, ~~, __, ~~~ fences and CRLF handling; colors come from the theme (accent for inline code, focus for links). The quote block type now holds lines instead of one joined text, so relay-chat's migration should use the new component rather than the old block types. Stacked on #4; merge last.

@autoantohaki
autoantohaki merged commit bc641a6 into main Oct 22, 2026
12 checks passed
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.

1 participant