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

Discussion: Inline code block disabled #26865

Open
DarinDev1000 opened this issue Sep 13, 2022 · 3 comments
Open

Discussion: Inline code block disabled #26865

DarinDev1000 opened this issue Sep 13, 2022 · 3 comments

Comments

@DarinDev1000
Copy link

DarinDev1000 commented Sep 13, 2022

Currently, to make a code block in a message, the 3 backticks on each end have to be on a new line.
I don't mind it being that way but when importing messages from slack, slack supports inline code blocks (same with github) and they do not convert correctly.
Is this an intended feature?
Maybe inline full code blocks should be supported?

Example:

This works in chat:

```
{
    "code": "block"
}
```

This does not work:

```{
    "code": "block"
}```
@dudanogueira
Copy link
Contributor

Hi! Thanks for pointing it out.

I marking here for discussion. I believe that the way it's working at with new parser follows a more strict approach, considering that right after the initial 3 back ticks, a convention is to define the name of the programming language to be rendered above., like so

replacing ` for ':

''' python
def populate_config(self):
pass
'''

@hugocostadev
Copy link
Contributor

hugocostadev commented Sep 28, 2022

I agree with @dudanogueira , I tried to write the same code that you send in the issue here and it does not reproduce the mentioned output:

This can generate a lot of issues, in my opinion, we should follow the current implementation.

Input:

```{
    "code": "block"
}```

Outputs:

    "code": "block"
}```

@ebyrne242
Copy link

ebyrne242 commented Nov 21, 2022

In addition to user expectations for people who are coming from slack or have been using rocket.chat for years, this also breaks message history for anyone using the new message template. We have years of messages that are still visible in search, but no longer format properly.

Some users also have the legacy message template enabled and can still send messages like this, but they don't format correctly for people on the new message template.

This was marked as fixed in #26388, but it's not as of 5.3.3.

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

4 participants