mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-20 07:16:10 +01:00
🎨 Display database title in bookmark panel https://github.com/siyuan-note/siyuan/issues/11666
This commit is contained in:
parent
11df239bd2
commit
511a4bdd8a
3 changed files with 9 additions and 3 deletions
|
|
@ -22,8 +22,10 @@ import (
|
|||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/88250/gulu"
|
||||
"github.com/88250/lute/parse"
|
||||
"github.com/siyuan-note/logging"
|
||||
"github.com/siyuan-note/siyuan/kernel/av"
|
||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||
|
|
@ -171,6 +173,10 @@ func BuildBookmark() (ret *Bookmarks) {
|
|||
if "" != block.Name {
|
||||
// Blocks in the bookmark panel display their name instead of content https://github.com/siyuan-note/siyuan/issues/8514
|
||||
block.Content = block.Name
|
||||
} else if "NodeAttributeView" == block.Type {
|
||||
// Display database title in bookmark panel https://github.com/siyuan-note/siyuan/issues/11666
|
||||
avID := gulu.Str.SubStringBetween(block.Markdown, "av-id=\"", "\"")
|
||||
block.Content, _ = av.GetAttributeViewName(avID)
|
||||
} else {
|
||||
// Improve bookmark panel rendering https://github.com/siyuan-note/siyuan/issues/9361
|
||||
tree, err := LoadTreeByBlockID(block.ID)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue