Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
rafaelks opened this issue Feb 28, 2018 · 3 comments · Fixed by #10496
Closed

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

rafaelks opened this issue Feb 28, 2018 · 3 comments · Fixed by #10496
Assignees
Milestone

Comments

@rafaelks
Copy link
Contributor

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;
@rafaelks rafaelks added this to the 0.63.0 milestone Feb 28, 2018
@rafaelks
Copy link
Contributor Author

@karlprieb Assigned to you, but not really sure who needs to be assigned.

@lunaticmonk
Copy link
Contributor

lunaticmonk commented Feb 28, 2018

@rafaelks @karlprieb If you don't mind, may I send a pull request?

@karlprieb
Copy link
Contributor

@sumedh123 go ahead :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment