mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-27 14:10:31 +03:00
Revert "markup/highlight: Add hl_inline option"
This reverts commit a360cab75a
.
This commit is contained in:
parent
4e14cf7607
commit
b82d95575d
4 changed files with 2 additions and 72 deletions
|
@ -75,24 +75,11 @@ func (h chromaHighlighter) Highlight(code, lang string, opts interface{}) (strin
|
|||
}
|
||||
var b strings.Builder
|
||||
|
||||
low, high, err := highlight(&b, code, lang, nil, cfg)
|
||||
|
||||
if err != nil {
|
||||
if _, _, err := highlight(&b, code, lang, nil, cfg); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if !cfg.Hl_inline {
|
||||
return b.String(), nil
|
||||
}
|
||||
|
||||
hr := HightlightResult{
|
||||
highlighted: template.HTML(b.String()),
|
||||
innerLow: low,
|
||||
innerHigh: high,
|
||||
}
|
||||
|
||||
return string(hr.Inner()), nil
|
||||
|
||||
return b.String(), nil
|
||||
}
|
||||
|
||||
func (h chromaHighlighter) HighlightCodeBlock(ctx hooks.CodeblockContext, opts interface{}) (HightlightResult, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue