Allow page.TableOfContents on self in shortcode

Fixes #10791
This commit is contained in:
Bjørn Erik Pedersen
2023-03-05 09:51:14 +01:00
parent f56ce01ae1
commit df5608f8a0
4 changed files with 46 additions and 18 deletions

View File

@@ -128,11 +128,6 @@ func (lcp *LazyContentProvider) RenderString(ctx context.Context, args ...any) (
return lcp.cp.RenderString(ctx, args...)
}
func (lcp *LazyContentProvider) TableOfContents(ctx context.Context) template.HTML {
lcp.init.Do(ctx)
return lcp.cp.TableOfContents(ctx)
}
func (lcp *LazyContentProvider) ParseAndRenderContent(ctx context.Context, content []byte, renderTOC bool) (converter.ResultRender, error) {
lcp.init.Do(ctx)
return lcp.cp.ParseAndRenderContent(ctx, content, renderTOC)