RocketChat / RocketChat/Rocket.Chat
Timestamps not parsed inside bold and italic text
Nobody has claimed this yet.
- 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:
~<t:1708551317>~→ ✅ renders as formatted timestamp inside strikethrough**<t:1708551317>**→ ❌ renders as raw text<t:1708551317>inside bold_<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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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