RocketChat / RocketChat/Rocket.Chat

Timestamps not parsed inside bold and italic text

Open Beginner friendly
#39,376 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: bug
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in grammar.pegjs by comparing StrikethroughContent with BoldContentPreferentialItemPattern and ItalicContentPreferentialItemPattern. Add the missing timestamp handling described in the issue, then reproduce the three messages to verify timestamps render correctly inside strikethrough, bold, and italic text.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
content
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.