mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 支持搜索超链接元素 URL Fix https://github.com/siyuan-note/siyuan/issues/5273
This commit is contained in:
@@ -75,7 +75,15 @@ func NodeStaticContent(node *ast.Node) string {
|
||||
buf.WriteString(GetDynamicBlockRefText(n))
|
||||
lastSpace = false
|
||||
return ast.WalkSkipChildren
|
||||
case ast.NodeText, ast.NodeLinkText, ast.NodeLinkTitle, ast.NodeFileAnnotationRefText, ast.NodeFootnotesRef,
|
||||
case ast.NodeLinkText:
|
||||
buf.Write(n.Tokens)
|
||||
buf.WriteByte(' ')
|
||||
case ast.NodeLinkDest:
|
||||
buf.Write(n.Tokens)
|
||||
buf.WriteByte(' ')
|
||||
case ast.NodeLinkTitle:
|
||||
buf.Write(n.Tokens)
|
||||
case ast.NodeText, ast.NodeFileAnnotationRefText, ast.NodeFootnotesRef,
|
||||
ast.NodeCodeSpanContent, ast.NodeInlineMathContent, ast.NodeCodeBlockCode, ast.NodeMathBlockContent, ast.NodeHTMLBlock:
|
||||
buf.Write(n.Tokens)
|
||||
case ast.NodeBackslash:
|
||||
@@ -204,6 +212,7 @@ var typeAbbrMap = map[string]string{
|
||||
// 行级元素
|
||||
"NodeText": "text",
|
||||
"NodeLinkText": "link_text",
|
||||
"NodeLinkDest": "link_dest",
|
||||
"NodeTag": "tag",
|
||||
"NodeCodeSpan": "code_span",
|
||||
"NodeInlineMath": "inline_math",
|
||||
|
||||
Reference in New Issue
Block a user