Repository navigation
Matrix rich text both ways - #6
Open
hsmith-dev wants to merge 1 commit into
Open
hsmith-dev wants to merge 1 commit into
hsmith-dev wants to merge 1 commit into
Conversation
- received formatted_body HTML (bold, italic, strike, code, pre, links, mention pills, quotes, lists, br/p) converted to ChatCraft markup by a small tolerant converter (no HTML parser dependency, never executed) - sent messages carry formatted_body rendered by ChatCraft's own parser, so *x* is bold for Element users too; mention pills for @Handles - ChatCraft-authored messages keep their exact source (HTML re-renders from the body); edits use the same path - drop the SDK markdown feature - tests: converter fixtures, hostile HTML, round trip, mapper pills Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Gap 0.6 (stacked on #5): formatting survives the trip between ChatCraft and other Matrix clients.
formatted_bodyHTML (bold, italic, strike, code, code blocks, links, mention pills, quotes, lists, line breaks) becomes ChatCraft markup through a small, tolerant converter (no HTML dependency; tags are never executed; output capped).formatted_bodyis rendered by ChatCraft's own parser instead of CommonMark, so*x*reaches Element users as bold (it was italic), and@handlebecomes a mention pill.Testing
cargo xtask cipasses; all Matrix integration tests pass.@quinn: *shipped!* See <https://example.org/notes|the notes>with its list.🤖 Generated with Claude Code