RocketChat / RocketChat/Rocket.Chat
Some emojis (emoticons) break the MD parser
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
If you post a message like this one: *text:* you will not get a bold text or text with emoji.
I suppose, there is a bug in a PEG grammar: see packages/message-parser/src/grammar.pegjs
Some where between rules Bold and Emoticon. The root of this case is :* - kissing_heart emoticon.
I've thired to figure out how this PEG works, but failed.
Steps to reproduce:
- Post a message
*text:*
Expected behavior:
There is a bolded text text:
Actual behavior:
There is just a text.
Note: If you post *text :* you will get *text and an emoji.
Server Setup Information:
- Version of Rocket.Chat Server: 6.9.0 and erlier
- Operating System: any
- Deployment Method: any
- Number of Running Instances: any
- NodeJS Version: 14.21.3
- MongoDB Version: 7.3
Client Setup Information
- Desktop App or Browser Version: any
- Operating System: any
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 with packages/message-parser/src/grammar.pegjs, focusing on the Bold and Emoticon rules and how the :* sequence is parsed. Reproduce the issue with *text:* and verify that it renders as bold text: while preserving the existing emoticon behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- content
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100