RocketChat / RocketChat/Rocket.Chat.ReactNative

feature: Code Block Optimization

Open
#5,499 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.4k
Forks
1.5k
Avg merge
1d 18h
Merged PRs (30d)
90

Description

On the client side, optimization of code block text is desired:

When copying Do not copy the ``` pairs at the beginning and end. Or show a copy button in the top right corner to copy the internal text of the code block like github.

Also would like to support syntax highlighting. (Just to leave a note, I know it's a bit of a pain to implement, it's not an urgent need, it would just look relatively comfortable)

source:

在客户端上,希望对代码块文本进行优化:

复制时 不复制开头结尾的```对。或者像github这样右上角显示复制按钮来复制代码块内部文本。

另外希望支持语法高亮。(只是想留个记录,我知道实现起来有点麻烦,并不是急迫的需求,只是看起来会相对舒服一点)

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

Start by locating the React Native client code that renders message code blocks and handles copying; no specific files or tests are named in the issue. Compare the current behavior with GitHub, then confirm whether the target is fence-free copying, a copy button, syntax highlighting, or a scoped subset. Done should be demonstrated by the agreed code-block behavior on the client.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.