CodeblockContext method renames

Fixes #9577
This commit is contained in:
Bjørn Erik Pedersen 2022-02-27 13:31:55 +01:00
parent e1f696911e
commit f7109771a0
7 changed files with 14 additions and 14 deletions

View file

@ -103,7 +103,7 @@ func (h chromaHighlighter) HighlightCodeBlock(ctx hooks.CodeblockContext, opts i
return HightlightResult{}, err
}
err := highlight(&b, ctx.Code(), ctx.Lang(), attributes, cfg)
err := highlight(&b, ctx.Inner(), ctx.Type(), attributes, cfg)
if err != nil {
return HightlightResult{}, err
}
@ -125,9 +125,9 @@ func (h chromaHighlighter) RenderCodeblock(w hugio.FlexiWriter, ctx hooks.Codebl
return err
}
code := text.Puts(ctx.Code())
code := text.Puts(ctx.Inner())
return highlight(w, code, ctx.Lang(), attributes, cfg)
return highlight(w, code, ctx.Type(), attributes, cfg)
}
func (h chromaHighlighter) IsDefaultCodeBlockRenderer() bool {