mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-19 21:21:39 +02:00
@@ -61,6 +61,7 @@ type Highlighter interface {
|
||||
Highlight(code, lang string, opts interface{}) (string, error)
|
||||
HighlightCodeBlock(ctx hooks.CodeblockContext, opts interface{}) (HightlightResult, error)
|
||||
hooks.CodeBlockRenderer
|
||||
hooks.IsDefaultCodeBlockRendererProvider
|
||||
}
|
||||
|
||||
type chromaHighlighter struct {
|
||||
@@ -129,6 +130,10 @@ func (h chromaHighlighter) RenderCodeblock(w hugio.FlexiWriter, ctx hooks.Codebl
|
||||
return highlight(w, code, ctx.Lang(), attributes, cfg)
|
||||
}
|
||||
|
||||
func (h chromaHighlighter) IsDefaultCodeBlockRenderer() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
var id = identity.NewPathIdentity("chroma", "highlight")
|
||||
|
||||
func (h chromaHighlighter) GetIdentity() identity.Identity {
|
||||
|
Reference in New Issue
Block a user