mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 12:58:48 +01:00
🎨 Improve search highlighting https://github.com/siyuan-note/siyuan/issues/13343
This commit is contained in:
parent
4b3f95e4bf
commit
c1fd34f57b
6 changed files with 32 additions and 14 deletions
|
|
@ -599,7 +599,7 @@ func StatTree(id string) (ret *util.BlockStatResult) {
|
|||
}
|
||||
}
|
||||
|
||||
func GetDoc(startID, endID, id string, index int, query string, queryTypes map[string]bool, queryMethod, mode int, size int, isBacklink bool) (blockCount int, dom, parentID, parent2ID, rootID, typ string, eof, scroll bool, boxID, docPath string, isBacklinkExpand bool, err error) {
|
||||
func GetDoc(startID, endID, id string, index int, query string, queryTypes map[string]bool, queryMethod, mode int, size int, isBacklink, highlight bool) (blockCount int, dom, parentID, parent2ID, rootID, typ string, eof, scroll bool, boxID, docPath string, isBacklinkExpand bool, err error) {
|
||||
//os.MkdirAll("pprof", 0755)
|
||||
//cpuProfile, _ := os.Create("pprof/GetDoc")
|
||||
//pprof.StartCPUProfile(cpuProfile)
|
||||
|
|
@ -844,7 +844,7 @@ func GetDoc(startID, endID, id string, index int, query string, queryTypes map[s
|
|||
}
|
||||
}
|
||||
|
||||
if 0 < len(keywords) {
|
||||
if highlight && 0 < len(keywords) {
|
||||
hitBlock := false
|
||||
for p := n.Parent; nil != p; p = p.Parent {
|
||||
if p.ID == id {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue