RocketChat / RocketChat/Rocket.Chat.ReactNative
feature: Code Block Optimization
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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