diff options
Diffstat (limited to 'hugolib/page__per_output.go')
-rw-r--r-- | hugolib/page__per_output.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hugolib/page__per_output.go b/hugolib/page__per_output.go index 59ba722a8..59cb574df 100644 --- a/hugolib/page__per_output.go +++ b/hugolib/page__per_output.go @@ -440,8 +440,8 @@ func (pco *pageContentOutput) initRenderHooks() error { var offset int switch v := ctx.(type) { - case hooks.CodeblockContext: - offset = bytes.Index(source, []byte(v.Inner())) + case hooks.PositionerSourceTargetProvider: + offset = bytes.Index(source, v.PositionerSourceTarget()) } pos := pco.po.p.posFromInput(source, offset) @@ -481,6 +481,11 @@ func (pco *pageContentOutput) initRenderHooks() error { if id != nil { layoutDescriptor.KindVariants = id.(string) } + case hooks.BlockquoteRendererType: + layoutDescriptor.Kind = "render-blockquote" + if id != nil { + layoutDescriptor.KindVariants = id.(string) + } case hooks.CodeBlockRendererType: layoutDescriptor.Kind = "render-codeblock" if id != nil { |