feat(目录支持): 新增目录导航,支持层级展开与页码跳转
build.yaml / build (push) Successful in 52s

This commit is contained in:
xiaoqidun committed 2026-09-12 18:41:44 +08:00
1 parent 90bc7b93dc
commit c2899deff1
7 files changed
+238 -17

No files matched your search

+15
View File
@@ -102,6 +102,21 @@ type RegionCommand struct {
EndPoint string
}
// gotoDest 获取文档内跳转目标
// 入参: action 跳转动作, bookmarks 书签
// 返回: *Dest 跳转目标
func gotoDest(action *Goto, bookmarks map[string]Dest) *Dest {
if action.Dest != nil {
return action.Dest
}
if action.Bookmark != nil {
if dest, ok := bookmarks[action.Bookmark.Name]; ok {
return &dest
}
}
return nil
}
// UnmarshalXML 解析跳转目标
// 入参: d XML解码器, start 起始节点
// 返回: error 错误信息