summaryrefslogtreecommitdiffstats
path: root/modules/markup/renderer.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/markup/renderer.go')
-rw-r--r--modules/markup/renderer.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/modules/markup/renderer.go b/modules/markup/renderer.go
index e934aed925..f2477f1e9e 100644
--- a/modules/markup/renderer.go
+++ b/modules/markup/renderer.go
@@ -16,6 +16,16 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/setting"
+
+ "github.com/yuin/goldmark/ast"
+)
+
+type RenderMetaMode string
+
+const (
+ RenderMetaAsDetails RenderMetaMode = "details" // default
+ RenderMetaAsNone RenderMetaMode = "none"
+ RenderMetaAsTable RenderMetaMode = "table"
)
type ProcessorHelper struct {
@@ -63,7 +73,8 @@ type RenderContext struct {
GitRepo *git.Repository
ShaExistCache map[string]bool
cancelFn func()
- TableOfContents []Header
+ SidebarTocNode ast.Node
+ RenderMetaAs RenderMetaMode
InStandalonePage bool // used by external render. the router "/org/repo/render/..." will output the rendered content in a standalone page
}