diff options
Diffstat (limited to 'markup/highlight')
-rw-r--r-- | markup/highlight/highlight.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/markup/highlight/highlight.go b/markup/highlight/highlight.go index 156007d0a..dac45e312 100644 --- a/markup/highlight/highlight.go +++ b/markup/highlight/highlight.go @@ -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 { |