aboutsummaryrefslogtreecommitdiffhomepage
path: root/hugolib/shortcode.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r--hugolib/shortcode.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go
index b2f42ff1d..a10afe2bc 100644
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -381,6 +381,17 @@ func renderShortcode(
// Pre Hugo 0.55 this was the behaviour even for the outer-most
// shortcode.
if sc.doMarkup && (level > 0 || sc.configVersion() == 1) {
+
+ cp := p.pageOutput.cp
+ if cp == nil {
+ var err error
+ cp, err = newPageContentOutput(p, p.pageOutput)
+ if err != nil {
+ return "", false, err
+ }
+ p.pageOutput.initContentProvider(cp)
+ }
+
var err error
b, err := p.pageOutput.cp.renderContent([]byte(inner), false)
if err != nil {