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

@@ -58,7 +58,7 @@ And then some.
c.Assert(err, qt.IsNil)
b, err := conv.Convert(converter.RenderContext{Src: []byte(content), RenderTOC: true})
c.Assert(err, qt.IsNil)
got := b.(converter.TableOfContentsProvider).TableOfContents().ToHTML(2, 3)
got := b.(converter.TableOfContentsProvider).TableOfContents().ToHTML(2, 3, false)
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li><a href="#first-h2---now-with-typography">First h2&mdash;now with typography!</a>