diff options
author | Bjørn Erik Pedersen <[email protected]> | 2022-10-26 10:09:38 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-10-26 13:00:21 +0200 |
commit | 631d768be9dc2d5175eeacb8bf34ed8233e2201a (patch) | |
tree | 670dbabab18d4215f2495dd07fe012ed4e223438 /hugolib/page.go | |
parent | e5d2a8f6a3121701eb95712b5540989fafaa0c71 (diff) | |
download | hugo-631d768be9dc2d5175eeacb8bf34ed8233e2201a.tar.gz hugo-631d768be9dc2d5175eeacb8bf34ed8233e2201a.zip |
Revise the fix for shortcode vs output format nilpointer
We do lazy initialization and (potentially) reuse of an output format's rendered content. We do this evaluation when we
start a new rendering a new output format. There are, however, situation where these borders gets crossed (e.g.
accessing content from another output format). We have a check for this in place for most cases, but not the content
rendering of inner markdown blocks inside shortcodes. This patch applies that same logic to the newly introduced
RenderContent method (which is not available from the templates).
Fixes #10391
Diffstat (limited to 'hugolib/page.go')
-rw-r--r-- | hugolib/page.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hugolib/page.go b/hugolib/page.go index 37bf528c7..9f0d08ca3 100644 --- a/hugolib/page.go +++ b/hugolib/page.go @@ -909,6 +909,7 @@ func (p *pageState) shiftToOutputFormat(isRenderingSite bool, idx int) error { } return cp, nil }) + p.pageOutput.contentRenderer = lcp p.pageOutput.ContentProvider = lcp p.pageOutput.TableOfContentsProvider = lcp p.pageOutput.PageRenderProvider = lcp |