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

feature: Code Block Optimization #5499

Open
superen7527 opened this issue Jan 19, 2024 · 4 comments
Open

feature: Code Block Optimization #5499

superen7527 opened this issue Jan 19, 2024 · 4 comments

Comments

@superen7527
Copy link

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这样右上角显示复制按钮来复制代码块内部文本。

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

@superen7527
Copy link
Author

Or I can use a third party helper to get the TextView, but I need to optimize the internal display logic of the code block, and a code block as a whole lets me get the complete code block through Android's helper function, rather than a separate TextView for each line as it is now.

I would love to help you guys mention pr to optimize this project that I love. Unfortunately I don't really know how to program and only know a little bit about Android. I'm sorry I can't help you guys, but I can only post an issue here to raise a request. So there is no rush for my requirements, you guys can just develop it as you want, I'm just making a suggestion and I don't have to take it.

或者我也可以使用第三方辅助工具获取TextView,但是需要优化代码块内部显示逻辑,一个代码块为一个整体让我可以通过安卓的辅助功能获取完整的代码块,而不是现在这样的每一行独立一个TextView。

我很想帮助你们提pr来优化这个我喜欢的项目。可惜我并不会编程,只了解一点安卓相关的知识。很遗憾不能帮助你们,只能在这里发issue提需求。所以我的需求也不着急,你们按你们的想法开发即可,我只是提建议,可以不用采纳。

@preeesha
Copy link

preeesha commented Feb 9, 2024

Hey @superen7527, thanks for pointing out the issue.

I am working on this @diegolmello

@superen7527
Copy link
Author

thx

@superen7527
Copy link
Author

Sometimes more than one code block is sent, and also you may want to copy the original md format text So modifying the copy logic is not recommended, you should add copy buttons on each code block, which are shown hidden by focus.

有时候会发送多个代码块,而且也可能想复制md格式原文 所以修改复制逻辑不是很推荐,应该在每个代码块上添加复制按钮,通过焦点显示隐藏。

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

No branches or pull requests

2 participants