Skip to content

Timestamps not parsed inside bold and italic text #39376

@7vignesh

Description

@7vignesh

Timestamps (e.g. <t:1708551317>) are correctly parsed when wrapped in strikethrough (~~), but are silently treated as plain text when wrapped in bold (**) or italic (_).

Steps to reproduce:
Send the following messages in Rocket.Chat:

  1. ~<t:1708551317>~ → ✅ renders as formatted timestamp inside strikethrough
  2. **<t:1708551317>** → ❌ renders as raw text <t:1708551317> inside bold
  3. _<t:1708551317>_ → ❌ renders as raw text <t:1708551317> inside italic

Expected behavior:
Timestamps should be parsed and rendered correctly inside bold and italic text, just like they are inside strikethrough.

Root cause:
In grammar.pegjs, StrikethroughContent includes TimestampRules, but BoldContentPreferentialItemPattern and ItalicContentPreferentialItemPattern do not. Adding TimestampRules to both would fix this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions