summaryrefslogtreecommitdiffstats
path: root/hugolib/shortcode.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/shortcode.go')
-rw-r--r--hugolib/shortcode.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/hugolib/shortcode.go b/hugolib/shortcode.go
index d0cdf3950..700ac5bd8 100644
--- a/hugolib/shortcode.go
+++ b/hugolib/shortcode.go
@@ -21,6 +21,8 @@ import (
"html/template"
"path"
+ "github.com/gohugoio/hugo/markup/converter"
+
"github.com/gohugoio/hugo/common/herrors"
"github.com/pkg/errors"
@@ -43,7 +45,6 @@ import (
"github.com/gohugoio/hugo/output"
bp "github.com/gohugoio/hugo/bufferpool"
- "github.com/gohugoio/hugo/helpers"
"github.com/gohugoio/hugo/tpl"
)
@@ -347,13 +348,19 @@ func renderShortcode(
// Pre Hugo 0.55 this was the behaviour even for the outer-most
// shortcode.
if sc.doMarkup && (level > 0 || sc.info.Config.Version == 1) {
- newInner := s.ContentSpec.RenderBytes(&helpers.RenderingContext{
- Content: []byte(inner),
- PageFmt: p.m.markup,
- Cfg: p.Language(),
- DocumentID: p.File().UniqueID(),
- DocumentName: p.File().Path(),
- Config: p.getRenderingConfig()})
+ var err error
+
+ b, err := p.getContentConverter().Convert(
+ converter.RenderContext{
+ Src: []byte(inner),
+ },
+ )
+
+ if err != nil {
+ return "", false, err
+ }
+
+ newInner := b.Bytes()
// If the type is “” (unknown) or “markdown”, we assume the markdown
// generation has been performed. Given the input: `a line`, markdown