mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 搜索结果高亮支持大部分行级元素 https://github.com/siyuan-note/siyuan/issues/6745
This commit is contained in:
parent
92b88154fb
commit
7c40b44a15
9 changed files with 35 additions and 17 deletions
|
|
@ -28,6 +28,7 @@ import (
|
|||
"github.com/88250/lute/render"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
"github.com/siyuan-note/siyuan/kernel/util"
|
||||
)
|
||||
|
||||
func renderOutline(node *ast.Node, luteEngine *lute.Lute) (ret string) {
|
||||
|
|
@ -71,7 +72,7 @@ func renderBlockText(node *ast.Node, excludeTypes []string) (ret string) {
|
|||
ret = treenode.NodeStaticContent(node, excludeTypes)
|
||||
ret = strings.TrimSpace(ret)
|
||||
ret = strings.ReplaceAll(ret, "\n", "")
|
||||
ret = html.EscapeString(ret)
|
||||
ret = util.EscapeHTML(ret)
|
||||
ret = strings.TrimSpace(ret)
|
||||
if "" == ret {
|
||||
// 复制内容为空的块作为块引用时粘贴无效 https://github.com/siyuan-note/siyuan/issues/4962
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue