mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 06:00:25 +03:00
parent
423594e03a
commit
b80853de90
342 changed files with 2118 additions and 2102 deletions
|
@ -58,8 +58,8 @@ func New(cfg Config) Highlighter {
|
|||
}
|
||||
|
||||
type Highlighter interface {
|
||||
Highlight(code, lang string, opts interface{}) (string, error)
|
||||
HighlightCodeBlock(ctx hooks.CodeblockContext, opts interface{}) (HightlightResult, error)
|
||||
Highlight(code, lang string, opts any) (string, error)
|
||||
HighlightCodeBlock(ctx hooks.CodeblockContext, opts any) (HightlightResult, error)
|
||||
hooks.CodeBlockRenderer
|
||||
hooks.IsDefaultCodeBlockRendererProvider
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ type chromaHighlighter struct {
|
|||
cfg Config
|
||||
}
|
||||
|
||||
func (h chromaHighlighter) Highlight(code, lang string, opts interface{}) (string, error) {
|
||||
func (h chromaHighlighter) Highlight(code, lang string, opts any) (string, error) {
|
||||
cfg := h.cfg
|
||||
if err := applyOptions(opts, &cfg); err != nil {
|
||||
return "", err
|
||||
|
@ -82,7 +82,7 @@ func (h chromaHighlighter) Highlight(code, lang string, opts interface{}) (strin
|
|||
return b.String(), nil
|
||||
}
|
||||
|
||||
func (h chromaHighlighter) HighlightCodeBlock(ctx hooks.CodeblockContext, opts interface{}) (HightlightResult, error) {
|
||||
func (h chromaHighlighter) HighlightCodeBlock(ctx hooks.CodeblockContext, opts any) (HightlightResult, error) {
|
||||
cfg := h.cfg
|
||||
|
||||
var b strings.Builder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue