Closed
Description
Improve add highlighting to the subpage code snippet of the search bar.
In what scenarios do you need this feature?
搜索的普通文本能高亮显示,但是代码片段中的文本无法高亮显示,而是整个代码片段进行高亮……
Describe the optimal solution
代码片段搜索到的内容进行高亮显示,而不是整个代码片段高亮
Describe the candidate solution
No response
Other information
编辑,需求和 #8332 一样,主要是搜索内容的高亮,就像 https://github.com/Misuzu2027/syplugin-document-search 插件那样:
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]Improve add highlighting to the subpage code snippet of the search bar.[/-][+]搜索预览区代码块高亮关键字[/+]allrobot commentedon Jul 7, 2024
代码高亮是许多记录笔记时的必要功能,对于普通用户来说,知识管理所需的搜索功能很重要
然而,当前代码块的搜索体验存在不便,如点击参数时,光标仅跳转至代码块开始,而非目标字符串,给搜索带来不便,这增加了不必要的搜索时间:从代码块肉眼搜索关键词所需的时间
找了快10秒才从代码块找到--max相关的字符串
SiYuan_3e6tGjYRLa.webm
建议改进搜索功能:在预览区域,无论是代码块还是注释块,都应对匹配的字符串进行高亮显示;点击匹配项时,光标应精确跳转至目标字符串的起始位置,并高亮显示所在页面的所有匹配字符串。同时,用户进行其他操作,如随机点击后,高亮应消失,但在使用滚轮浏览时,高亮显示不应取消。
88250 commentedon Dec 8, 2024
合并到 #13343 中处理。