mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
🎨 Export related flashcard data when exporting .sy.zip https://github.com/siyuan-note/siyuan/issues/9372
This commit is contained in:
parent
2ca7253d1f
commit
a8806968d0
3 changed files with 72 additions and 2 deletions
|
|
@ -226,6 +226,21 @@ func GetBlockTreesByPathPrefix(pathPrefix string) (ret []*BlockTree) {
|
|||
return
|
||||
}
|
||||
|
||||
func GetBlockTreesByRootID(rootID string) (ret []*BlockTree) {
|
||||
blockTrees.Range(func(key, value interface{}) bool {
|
||||
slice := value.(*btSlice)
|
||||
slice.m.Lock()
|
||||
for _, b := range slice.data {
|
||||
if b.RootID == rootID {
|
||||
ret = append(ret, b)
|
||||
}
|
||||
}
|
||||
slice.m.Unlock()
|
||||
return true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
func RemoveBlockTreesByPathPrefix(pathPrefix string) {
|
||||
var ids []string
|
||||
blockTrees.Range(func(key, value interface{}) bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue