mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 23:36:10 +01:00
🐛 搜索高亮超链接锚文本后预览窗口修改导致地址失效 Fix https://github.com/siyuan-note/siyuan/issues/6982
This commit is contained in:
parent
997efb7778
commit
5e1d539719
1 changed files with 17 additions and 0 deletions
|
|
@ -910,6 +910,23 @@ func markReplaceSpan(n *ast.Node, unlinks *[]*ast.Node, keywords []string, markS
|
|||
c.Type = ast.NodeTextMark
|
||||
c.TextMarkType = n.TextMarkType
|
||||
c.TextMarkTextContent = string(c.Tokens)
|
||||
if n.IsTextMarkType("a") {
|
||||
c.TextMarkAHref, c.TextMarkATitle = n.TextMarkAHref, n.TextMarkATitle
|
||||
} else if n.IsTextMarkType("block-ref") {
|
||||
c.TextMarkBlockRefID = n.TextMarkBlockRefID
|
||||
c.TextMarkBlockRefSubtype = n.TextMarkBlockRefSubtype
|
||||
} else if n.IsTextMarkType("file-annotation-ref") {
|
||||
c.TextMarkFileAnnotationRefID = n.TextMarkFileAnnotationRefID
|
||||
}
|
||||
} else if ast.NodeTextMark == c.Type {
|
||||
if n.IsTextMarkType("a") {
|
||||
c.TextMarkAHref, c.TextMarkATitle = n.TextMarkAHref, n.TextMarkATitle
|
||||
} else if n.IsTextMarkType("block-ref") {
|
||||
c.TextMarkBlockRefID = n.TextMarkBlockRefID
|
||||
c.TextMarkBlockRefSubtype = n.TextMarkBlockRefSubtype
|
||||
} else if n.IsTextMarkType("file-annotation-ref") {
|
||||
c.TextMarkFileAnnotationRefID = n.TextMarkFileAnnotationRefID
|
||||
}
|
||||
}
|
||||
|
||||
children = append(children, c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue