Skip to content

Keep literal braces in timeline message text #94

Closed

Description

@iamnbutler

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions