markup/tableofcontents: Add config option for ordered list

This commit is contained in:
Gavin D. Howard 2019-12-11 23:48:40 -07:00 committed by Bjørn Erik Pedersen
parent 186a5ebfca
commit 4c804319f6
6 changed files with 68 additions and 13 deletions

View file

@ -292,7 +292,7 @@ func (p *pageContentOutput) TableOfContents() template.HTML {
p.p.s.initInit(p.initMain, p.p)
if tocProvider, ok := p.convertedResult.(converter.TableOfContentsProvider); ok {
cfg := p.p.s.ContentSpec.Converters.GetMarkupConfig()
return template.HTML(tocProvider.TableOfContents().ToHTML(cfg.TableOfContents.StartLevel, cfg.TableOfContents.EndLevel))
return template.HTML(tocProvider.TableOfContents().ToHTML(cfg.TableOfContents.StartLevel, cfg.TableOfContents.EndLevel, cfg.TableOfContents.Ordered))
}
return p.tableOfContents
}