Keep literal braces in timeline message text
iamnbutler opened ·
A sent message containing plain text `canAttach={false}` (not in backticks) renders in the timeline as `canAttach=`: the braces and their contents disappear, both visually and in the Accessibility text. The stored message keeps the full text (the channel summary generated from it preserves `canAttach={false}`), so only the timeline rendering drops it.
## Cause
The timeline parses message text with comark (`packages/ui/src/components/blocks/parse.ts`), which treats `{...}` after text as MDC inline attributes and removes it. Reproduced directly with comark:
``` "respect canAttach={false}, and" -> ["p",{},"respect canAttach=, and"] "respect `canAttach={false}`, and" -> ["p",{},"respect ",["code",{},"canAttach={false}"],", and"] ```
## Expected
Plain-text braces in chat messages render literally. Code, JSX props, and object literals are common in Ace messages, and text must never silently disappear from the timeline.
Observed while dogfooding #91 in Ace Canary 0.0.11. Part of #5.
iamnbutlerreferenced this in [Meta] Dogfood Ace end to end #5last month on GitHub
iamnbutlerparent-issue-addedlast month on GitHub
iamnbutlerreferenced this in feat(ui): attach images pasted into the composer #104last month on GitHub
iamnbutlerreferenced this in Long chat messages clip their final rendered line #168last month on GitHub