Repository navigation
feat: add Markdown rendering moved from relay-chat - #5
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by mau
Before: Markdown rendering lived only in relay-chat (
src/ui/markdown), tied toChatTheme. List items, quotes and headings showed**and backticks literally, ordered lists always restarted at 1,2 * 3 * 4turned into italics, and pipe tables showed as raw text.After:
Markdownin 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 withTableso they line up and fit the width. An unclosed fence still renders as code, as relay-chat needs while a reply streams.InlineText,CodeBlock,parseMarkdownBlocksandparseInlineare exported on their own.How: the parser is relay-chat's, extended with tables,
~~,__,~~~fences and CRLF handling; colors come from the theme (accentfor inline code,focusfor links). The quote block type now holdslinesinstead of one joinedtext, so relay-chat's migration should use the new component rather than the old block types. Stacked on #4; merge last.