mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-30 22:39:58 +02:00
markup/tableofcontents: Cast Fragments.ToHTML args to int
Closes #13107
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
487bb96474
commit
b529859008
@@ -730,16 +730,15 @@ func (c *cachedContentScope) contentToC(ctx context.Context) (contentTableOfCont
|
||||
isHTML := cp.po.p.m.pageConfig.ContentMediaType.IsHTML()
|
||||
|
||||
if !isHTML {
|
||||
createAndSetToC := func(tocProvider converter.TableOfContentsProvider) {
|
||||
createAndSetToC := func(tocProvider converter.TableOfContentsProvider) error {
|
||||
cfg := p.s.ContentSpec.Converters.GetMarkupConfig()
|
||||
ct.tableOfContents = tocProvider.TableOfContents()
|
||||
ct.tableOfContentsHTML = template.HTML(
|
||||
ct.tableOfContents.ToHTML(
|
||||
cfg.TableOfContents.StartLevel,
|
||||
cfg.TableOfContents.EndLevel,
|
||||
cfg.TableOfContents.Ordered,
|
||||
),
|
||||
ct.tableOfContentsHTML, err = ct.tableOfContents.ToHTML(
|
||||
cfg.TableOfContents.StartLevel,
|
||||
cfg.TableOfContents.EndLevel,
|
||||
cfg.TableOfContents.Ordered,
|
||||
)
|
||||
return err
|
||||
}
|
||||
|
||||
// If the converter supports doing the parsing separately, we do that.
|
||||
|
Reference in New Issue
Block a user