markup/tableofcontents: Return template.HTML from .Fragments.ToHTML

Closes #11545
This commit is contained in:
Joe Mooring
2023-10-08 16:59:36 -07:00
committed by Bjørn Erik Pedersen
parent d5d0f420d8
commit 1b5f78b6b7
4 changed files with 21 additions and 17 deletions

View File

@@ -109,7 +109,7 @@ LINE1
* Autolink: https://gohugo.io/
* Strikethrough:~~Hi~~ Hello, world!
## Table
| foo | bar |
@@ -137,7 +137,7 @@ That's some text with a footnote.[^1]
## Definition Lists
date
: the datetime assigned to this page.
: the datetime assigned to this page.
description
: the description for the content.
@@ -204,8 +204,8 @@ unsafe = true
toc, ok := b.(converter.TableOfContentsProvider)
c.Assert(ok, qt.Equals, true)
tocHTML := toc.TableOfContents().ToHTML(1, 2, false)
c.Assert(tocHTML, qt.Contains, "TableOfContents")
tocString := string(toc.TableOfContents().ToHTML(1, 2, false))
c.Assert(tocString, qt.Contains, "TableOfContents")
}
func TestConvertAutoIDAsciiOnly(t *testing.T) {