RocketChat / RocketChat/Rocket.Chat

Discussion: Inline code block disabled

Open
#26,865 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

message rendering type: discussion
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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"
}```

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test entry point is named in the report. Reproduce the two fenced-code examples, then trace the message formatting path used for imported Slack content; done means inline fences render as a full code block without regressing line-delimited fences, with coverage for both examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
content
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.