aboutsummaryrefslogtreecommitdiffhomepage
path: root/markup/tableofcontents/tableofcontents_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'markup/tableofcontents/tableofcontents_test.go')
-rw-r--r--markup/tableofcontents/tableofcontents_test.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/markup/tableofcontents/tableofcontents_test.go b/markup/tableofcontents/tableofcontents_test.go
index adbda4b00..ac9ad0eed 100644
--- a/markup/tableofcontents/tableofcontents_test.go
+++ b/markup/tableofcontents/tableofcontents_test.go
@@ -45,7 +45,7 @@ func TestToc(t *testing.T) {
toc.addAt(&Heading{Title: "1-H3-1", ID: "1-h2-2"}, 0, 2)
toc.addAt(&Heading{Title: "Heading 2", ID: "h1-2"}, 1, 0)
- got := toc.ToHTML(1, -1, false)
+ got := string(toc.ToHTML(1, -1, false))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li><a href="#h1-1">Heading 1</a>
@@ -62,7 +62,7 @@ func TestToc(t *testing.T) {
</ul>
</nav>`, qt.Commentf(got))
- got = toc.ToHTML(1, 1, false)
+ got = string(toc.ToHTML(1, 1, false))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li><a href="#h1-1">Heading 1</a></li>
@@ -70,7 +70,7 @@ func TestToc(t *testing.T) {
</ul>
</nav>`, qt.Commentf(got))
- got = toc.ToHTML(1, 2, false)
+ got = string(toc.ToHTML(1, 2, false))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li><a href="#h1-1">Heading 1</a>
@@ -83,7 +83,7 @@ func TestToc(t *testing.T) {
</ul>
</nav>`, qt.Commentf(got))
- got = toc.ToHTML(2, 2, false)
+ got = string(toc.ToHTML(2, 2, false))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li><a href="#1-h2-1">1-H2-1</a></li>
@@ -91,7 +91,7 @@ func TestToc(t *testing.T) {
</ul>
</nav>`, qt.Commentf(got))
- got = toc.ToHTML(1, -1, true)
+ got = string(toc.ToHTML(1, -1, true))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ol>
<li><a href="#h1-1">Heading 1</a>
@@ -118,7 +118,7 @@ func TestTocMissingParent(t *testing.T) {
toc.addAt(&Heading{Title: "H3", ID: "h3"}, 1, 2)
toc.addAt(&Heading{Title: "H3", ID: "h3"}, 1, 2)
- got := toc.ToHTML(1, -1, false)
+ got := string(toc.ToHTML(1, -1, false))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li>
@@ -139,7 +139,7 @@ func TestTocMissingParent(t *testing.T) {
</ul>
</nav>`, qt.Commentf(got))
- got = toc.ToHTML(3, 3, false)
+ got = string(toc.ToHTML(3, 3, false))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ul>
<li><a href="#h3">H3</a></li>
@@ -147,7 +147,7 @@ func TestTocMissingParent(t *testing.T) {
</ul>
</nav>`, qt.Commentf(got))
- got = toc.ToHTML(1, -1, true)
+ got = string(toc.ToHTML(1, -1, true))
c.Assert(got, qt.Equals, `<nav id="TableOfContents">
<ol>
<li>