aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/renderer.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/renderer.go')
-rw-r--r--modules/markup/renderer.go28
1 files changed, 18 insertions, 10 deletions
diff --git a/modules/markup/renderer.go b/modules/markup/renderer.go
index cf8b9bace7..53ecbfce2b 100644
--- a/modules/markup/renderer.go
+++ b/modules/markup/renderer.go
@@ -33,18 +33,26 @@ func Init() {
}
}
+// Header holds the data about a header.
+type Header struct {
+ Level int
+ Text string
+ ID string
+}
+
// RenderContext represents a render context
type RenderContext struct {
- Ctx context.Context
- Filename string
- Type string
- IsWiki bool
- URLPrefix string
- Metas map[string]string
- DefaultLink string
- GitRepo *git.Repository
- ShaExistCache map[string]bool
- cancelFn func()
+ Ctx context.Context
+ Filename string
+ Type string
+ IsWiki bool
+ URLPrefix string
+ Metas map[string]string
+ DefaultLink string
+ GitRepo *git.Repository
+ ShaExistCache map[string]bool
+ cancelFn func()
+ TableOfContents []Header
}
// Cancel runs any cleanup functions that have been registered for this Ctx