diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-27 13:31:55 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-27 17:59:36 +0100 |
commit | f7109771a038e0237350dcfbe20f1036e9c8a46b (patch) | |
tree | c9eed611c56a8969509e40bc2db27d4e5e77d4ef /markup/highlight | |
parent | e1f696911ebbf870f9b6b814421dc880945a6b9a (diff) |
CodeblockContext method renames
Fixes #9577
Diffstat (limited to 'markup/highlight')
-rw-r--r-- | markup/highlight/highlight.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/markup/highlight/highlight.go b/markup/highlight/highlight.go index dac45e312..c04fbad31 100644 --- a/markup/highlight/highlight.go +++ b/markup/highlight/highlight.go @@ -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 { |