Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

New message parser fails to render markdown-formatted links with underscores in the description

Open ebyrne242 opened this issue 3 years ago • 5 comments

Description:

New message parser fails to render markdown-formatted links with underscores in the description. This does not occur with the legacy message parser.

Steps to reproduce:

  1. Enter a message such as [google_search](https://www.google.com)

Expected behavior:

Link is rendered with the link text google_search

Actual behavior:

The text is displayed as entered. This is the rendered output of:

[google_search](https://www.google.com)
[google search](https://www.google.com)
image

Server Setup Information:

  • Version of Rocket.Chat Server: 5.3.3
  • Operating System: Rocky Linux 8.7
  • Deployment Method: docker
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • NodeJS Version: v14.19.3
  • MongoDB Version: 5.0.14 / wiredTiger (oplog Enabled)

Client Setup Information

  • Desktop App or Browser Version: Desktop App 3.8.12 (Linux) and 3.8.13 (MacOS)
  • Operating System: Linux and MacOS

ebyrne242 avatar Dec 07 '22 19:12 ebyrne242

@ebyrne242 thanks for your contribution, this will be addressed soon!

hugocostadev avatar Dec 16 '22 15:12 hugocostadev

Hey, can I work on this? @hugocostadev

viniciused26 avatar Dec 19 '22 23:12 viniciused26

Sure @viniciused26 , it's not so trivial, but if you like a challenge you can check it out the repository and package that we build our parser.

Our parser is built in PEGjs library for reference.

Package/Repo: https://github.com/RocketChat/fuselage/tree/develop/packages/message-parser

hugocostadev avatar Dec 20 '22 12:12 hugocostadev

Ok, I'll take a look to see if I can help. I was hoping to contribute with the project, but the issues labeled as "good first issue" seemed outdated, if you have good issues for begginers I would love to take a look at them. Thanks.

viniciused26 avatar Dec 20 '22 12:12 viniciused26

It's not just underscores.... It's also 3 types of brackets, star operators, etc.

Plz @ebyrne242 update the description. image

(RC version 5.3.5)

dusatvoj avatar Dec 20 '22 13:12 dusatvoj

Hey @ebyrne242 @dusatvoj @viniciused26 This error is not happening on my machine Screenshot_5

Toledodev avatar Dec 29 '22 17:12 Toledodev

Hey @ebyrne242 @dusatvoj @viniciused26 This error is not happening on my machine Screenshot_5

Weird, which version?

dusatvoj avatar Dec 29 '22 19:12 dusatvoj

Hey @dusatvoj

  • Version of Rocket.Chat Server: 6.0.0
  • Operating System: Ubuntu
  • Deployment Method: docker
  • NodeJS Version: v14.19.3
  • MongoDb Version: 5.0.5

Toledodev avatar Dec 29 '22 20:12 Toledodev

@Toledodev what? RocketChat server 6.0.0? :thinking: :grinning:

dusatvoj avatar Dec 29 '22 21:12 dusatvoj

I guess that means the issue is fixed on the latest develop ;)

debdutdeb avatar Dec 30 '22 04:12 debdutdeb

@dusatvoj @debdutdeb Screenshot_1

Toledodev avatar Dec 30 '22 21:12 Toledodev

Today I've upgraded to 5.4.1 (latest stable) and there's very tricky behavior. Different inside and outside of a thread.

image image

dusatvoj avatar Jan 15 '23 19:01 dusatvoj

I'm working on this issue, soon we will have a fix for that!

hugocostadev avatar Jan 16 '23 18:01 hugocostadev