@@ -23,7 +23,6 @@ import (
2323 htext "github.com/gohugoio/hugo/common/text"
2424 "github.com/gohugoio/hugo/markup/converter/hooks"
2525 "github.com/gohugoio/hugo/markup/goldmark/internal/render"
26- "github.com/gohugoio/hugo/markup/highlight/chromalexers"
2726 "github.com/gohugoio/hugo/markup/internal/attributes"
2827 "github.com/yuin/goldmark"
2928 "github.com/yuin/goldmark/ast"
@@ -89,13 +88,6 @@ func (r *htmlRenderer) renderCodeBlock(w util.BufWriter, src []byte, node ast.No
8988 info = n .Info .Segment .Value (src )
9089 }
9190
92- attrtp := attributes .AttributesOwnerCodeBlockCustom
93- if isd , ok := renderer .(hooks.IsDefaultCodeBlockRendererProvider ); (ok && isd .IsDefaultCodeBlockRenderer ()) || chromalexers .Get (lang ) != nil {
94- // We say that this is a Chroma code block if it's the default code block renderer
95- // or if the language is supported by Chroma.
96- attrtp = attributes .AttributesOwnerCodeBlockChroma
97- }
98-
9991 attrs , attrStr , err := getAttributes (n , info )
10092 if err != nil {
10193 return ast .WalkStop , & herrors.TextSegmentError {Err : err , Segment : attrStr }
@@ -105,7 +97,7 @@ func (r *htmlRenderer) renderCodeBlock(w util.BufWriter, src []byte, node ast.No
10597 BaseContext : render .NewBaseContext (ctx , renderer , node , src , ordinal ),
10698 lang : lang ,
10799 code : s ,
108- AttributesHolder : attributes .New (attrs , attrtp ),
100+ AttributesHolder : attributes .New (attrs , attributes . AttributesOwnerCodeBlockChroma ),
109101 }
110102
111103 cr := renderer .(hooks.CodeBlockRenderer )
0 commit comments