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

Inline code formatting not correct for multi-line code #9625

Closed
TwizzyDizzy opened this issue Feb 7, 2018 · 7 comments
Closed

Inline code formatting not correct for multi-line code #9625

TwizzyDizzy opened this issue Feb 7, 2018 · 7 comments

Comments

@TwizzyDizzy
Copy link

TwizzyDizzy commented Feb 7, 2018

Description:

image

If you select a text in the chat text area (where you write messages) and want to mark it as inline code, it is not taken into account, whether the text that is selected is single-line or multi-line. It only works as expected for single-line text.

Server Setup Information:

Version of Rocket.Chat Server: 0.61.0
Operating System: Oracle Linux 7
Deployment Method(snap/docker/tar/etc): tar
Number of Running Instances: 1
DB Replicaset Oplog: Disabled
Node Version: 8.9.4

Steps to Reproduce:

  1. Type multi-line text in chat text area
  2. Click on the icon (see image above) to mark text as inline code

Expected behavior:

Text should be transformed to

```this
is a multiline
text```

Actual behavior:

Text is transformed to

`this
is a multiline
text`

Relevant logs:

@TwizzyDizzy TwizzyDizzy changed the title Inline code formatting Inline code formatting not correct for multi-line code Feb 7, 2018
@rgoerner
Copy link

rgoerner commented Jun 6, 2019

#9581

This seems to be still a open bug? Hm ;(

@TheRealBecks
Copy link

Yeah, that bug is still open. Also the documentation is not correct as there is a white space in the code tag: https://rocket.chat/docs/contributing/documentation/markdown-styleguide/#md031---fenced-code-blocks-should-be-surrounded-by-blank-lines
Documentation:
`` `
Correct tag:
```

@MartinNGG
Copy link

Is this really a nearly 5y old bug and still not fixed?

Can we have an update?

@diegobelotti
Copy link

diegobelotti commented Feb 16, 2023

May be it was fixed fo sure from 4.1 up to 4.8.7.
In every 5.x inline code has moved from
```code
here```
to
`code here`
and multiline is not working

@cuu508
Copy link

cuu508 commented May 30, 2023

I signed up for a trial Rocket.Chat account, the dashboard shows it's running version 6.2.2.

I can enter multi-line preformatted text in the chat box (the back-ticks have to be on separate lines):

image

I can post multi-line preformatted text via incoming webhooks, in the text field:

image

Posting it in an attachment's text or pretext field also works:

image

Posting it in an attachment's field does not work – it seems to get displayed as inline code:

image

@MartinSchoeler
Copy link
Contributor

Today we have separate options for single line and multiline code, I'll be closing this for now, thanks!

@cuu508
Copy link

cuu508 commented Oct 25, 2024

@MartinSchoeler multiline code formatting is still broken in attachment field.

Example webhook payload:

image

Looks OK in the mobile app:

image

Broken in the desktop app (all on the same line):

image

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

No branches or pull requests

7 participants