diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-26 17:24:10 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2022-02-26 21:54:36 +0100 |
commit | 579ff9b6524ed4e55c191ab94251f5a2fe315f68 (patch) | |
tree | 0249f3ae723241c4cc2fef7e9ad9ddf06e4bc523 /markup/highlight | |
parent | 928a89696273b1a5defa0e85115c9bd0e167cbf0 (diff) |
markup/goldmark: Improve attributes vs options
Fixes #9571
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 { |