Skip to content

[BUG] Markdown parsing code adds a new line and parse image URLs #9942

@rafaelks

Description

@rafaelks

Description:

This issue is about two things in our Markdown parsing:

  1. It adds a new line to the markdown processed HTML;
  2. It renders the images of the links that are inside of the code block;

screen shot 2018-02-28 at 10 00 16

Server Setup Information:

  • Version of Rocket.Chat Server: 0.62
  • Operating System: Linux

Steps to Reproduce:

  1. Send a new message with this text:
Here's the code block, remove the initial `\` in the begin and the end before sending the message.

\```
➜  ~  time wget https://open.rocket.chat/avatar/rafael.kellermann
--2018-02-28 09:58:41--  https://open.rocket.chat/avatar/rafael.kellermann
Resolving open.rocket.chat... 104.196.189.8
Connecting to open.rocket.chat|104.196.189.8|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10875 (11K) [image/jpeg]
Saving to: 'rafael.kellermann'

rafael.kellermann                      100%[===========================================================================>]  10.62K  --.-KB/s    in 0s      

2018-02-28 09:59:05 (30.1 MB/s) - 'rafael.kellermann' saved [10875/10875]


real	0m23.927s
user	0m0.023s
sys	0m0.020s
\```

Expected behavior:

  1. It should not add a new line;
  2. It should not render the images;

Actual behavior:

  1. It adds a new line;
  2. It renders the images;

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions