Browse Source

:art: 查找替换支持替换超链接地址 Fix https://github.com/siyuan-note/siyuan/issues/5750

Liang Ding 2 years ago
parent
commit
bcbbb43059
1 changed files with 1 additions and 1 deletions
  1. 1 1
      kernel/model/search.go

+ 1 - 1
kernel/model/search.go

@@ -161,7 +161,7 @@ func FindReplace(keyword, replacement string, ids []string) (err error) {
 					renameRootTitles[n.ID] = strings.ReplaceAll(title, keyword, replacement)
 					renameRootTitles[n.ID] = strings.ReplaceAll(title, keyword, replacement)
 					renameRoots = append(renameRoots, n)
 					renameRoots = append(renameRoots, n)
 				}
 				}
-			case ast.NodeText, ast.NodeLinkText, ast.NodeLinkTitle, ast.NodeCodeSpanContent, ast.NodeCodeBlockCode, ast.NodeInlineMathContent, ast.NodeMathBlockContent:
+			case ast.NodeText, ast.NodeLinkDest, ast.NodeLinkText, ast.NodeLinkTitle, ast.NodeCodeSpanContent, ast.NodeCodeBlockCode, ast.NodeInlineMathContent, ast.NodeMathBlockContent:
 				if bytes.Contains(n.Tokens, []byte(keyword)) {
 				if bytes.Contains(n.Tokens, []byte(keyword)) {
 					n.Tokens = bytes.ReplaceAll(n.Tokens, []byte(keyword), []byte(replacement))
 					n.Tokens = bytes.ReplaceAll(n.Tokens, []byte(keyword), []byte(replacement))
 				}
 				}