From 0d0cea11c9879bd802455cde6c3c2ca33a1ada16 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Sun, 12 Feb 2023 22:18:54 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=90=9C=E7=B4=A2=E4=B8=8D=E5=88=B0?= =?UTF-8?q?=E8=B6=85=E9=93=BE=E6=8E=A5=E5=85=83=E7=B4=A0=E7=9A=84=20URL=20?= =?UTF-8?q?=E5=92=8C=E6=A0=87=E9=A2=98=20Fix=20https://github.com/siyuan-n?= =?UTF-8?q?ote/siyuan/issues/7352?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/treenode/node.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/treenode/node.go b/kernel/treenode/node.go index 763e847ab..d94b5eda8 100644 --- a/kernel/treenode/node.go +++ b/kernel/treenode/node.go @@ -225,6 +225,13 @@ func NodeStaticContent(node *ast.Node, excludeTypes []string) string { if n.IsTextMarkType("tag") { buf.WriteByte('#') } + if n.IsTextMarkType("a") { + // 搜索不到超链接元素的 URL 和标题 https://github.com/siyuan-note/siyuan/issues/7352 + if "" != n.TextMarkATitle { + buf.WriteString(" " + n.TextMarkATitle) + } + buf.WriteString(" " + n.TextMarkAHref) + } case ast.NodeBackslash: buf.WriteByte(lex.ItemBackslash) case ast.NodeBackslashContent: