Browse Source

:sparkles: 编辑器式反链面板 https://github.com/siyuan-note/siyuan/issues/3565

Liang Ding 2 years ago
parent
commit
efefa9baaf
2 changed files with 2 additions and 2 deletions
  1. 1 1
      kernel/api/ref.go
  2. 1 1
      kernel/model/backlink.go

+ 1 - 1
kernel/api/ref.go

@@ -90,7 +90,7 @@ func getBacklink(c *gin.Context) {
 	keyword := arg["k"].(string)
 	mentionKeyword := arg["mk"].(string)
 	beforeLen := arg["beforeLen"].(float64)
-	boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.BuildTreeBacklink(id, keyword, mentionKeyword, int(beforeLen))
+	boxID, backlinks, backmentions, linkRefsCount, mentionsCount := model.GetBacklink(id, keyword, mentionKeyword, int(beforeLen))
 	ret.Data = map[string]interface{}{
 		"backlinks":     backlinks,
 		"linkRefsCount": linkRefsCount,

+ 1 - 1
kernel/model/backlink.go

@@ -297,7 +297,7 @@ func buildBacklink(refID string, refTree *parse.Tree, luteEngine *lute.Lute) (re
 	return
 }
 
-func BuildTreeBacklink(id, keyword, mentionKeyword string, beforeLen int) (boxID string, backlinks, backmentions []*Path, linkRefsCount, mentionsCount int) {
+func GetBacklink(id, keyword, mentionKeyword string, beforeLen int) (boxID string, backlinks, backmentions []*Path, linkRefsCount, mentionsCount int) {
 	keyword = strings.TrimSpace(keyword)
 	mentionKeyword = strings.TrimSpace(mentionKeyword)
 	backlinks, backmentions = []*Path{}, []*Path{}