🐛 搜索不到超链接元素的 URL 和标题 Fix https://github.com/siyuan-note/siyuan/issues/7352

This commit is contained in:
Liang Ding 2023-02-12 22:18:54 +08:00
parent 223011f84b
commit 0d0cea11c9
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -225,6 +225,13 @@ func NodeStaticContent(node *ast.Node, excludeTypes []string) string {
if n.IsTextMarkType("tag") { if n.IsTextMarkType("tag") {
buf.WriteByte('#') 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: case ast.NodeBackslash:
buf.WriteByte(lex.ItemBackslash) buf.WriteByte(lex.ItemBackslash)
case ast.NodeBackslashContent: case ast.NodeBackslashContent: