mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
markup: Rename Header(s) to Heading(s) in ToC struct
Because that is what it is.
This commit is contained in:
@@ -340,42 +340,42 @@ testContent
|
||||
toc, ok := r.(converter.TableOfContentsProvider)
|
||||
c.Assert(ok, qt.Equals, true)
|
||||
expected := tableofcontents.Root{
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "",
|
||||
Text: "",
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "_introduction",
|
||||
Text: "Introduction",
|
||||
Headers: nil,
|
||||
ID: "_introduction",
|
||||
Text: "Introduction",
|
||||
Headings: nil,
|
||||
},
|
||||
{
|
||||
ID: "_section_1",
|
||||
Text: "Section 1",
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "_section_1_1",
|
||||
Text: "Section 1.1",
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "_section_1_1_1",
|
||||
Text: "Section 1.1.1",
|
||||
Headers: nil,
|
||||
ID: "_section_1_1_1",
|
||||
Text: "Section 1.1.1",
|
||||
Headings: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "_section_1_2",
|
||||
Text: "Section 1.2",
|
||||
Headers: nil,
|
||||
ID: "_section_1_2",
|
||||
Text: "Section 1.2",
|
||||
Headings: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "_section_2",
|
||||
Text: "Section 2",
|
||||
Headers: nil,
|
||||
ID: "_section_2",
|
||||
Text: "Section 2",
|
||||
Headings: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -408,15 +408,15 @@ func TestTableOfContentsWithCode(t *testing.T) {
|
||||
toc, ok := r.(converter.TableOfContentsProvider)
|
||||
c.Assert(ok, qt.Equals, true)
|
||||
expected := tableofcontents.Root{
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "",
|
||||
Text: "",
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "_some_code_in_the_title",
|
||||
Text: "Some <code>code</code> in the title",
|
||||
Headers: nil,
|
||||
ID: "_some_code_in_the_title",
|
||||
Text: "Some <code>code</code> in the title",
|
||||
Headings: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -452,15 +452,15 @@ func TestTableOfContentsPreserveTOC(t *testing.T) {
|
||||
toc, ok := r.(converter.TableOfContentsProvider)
|
||||
c.Assert(ok, qt.Equals, true)
|
||||
expected := tableofcontents.Root{
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "",
|
||||
Text: "",
|
||||
Headers: tableofcontents.Headers{
|
||||
Headings: tableofcontents.Headings{
|
||||
{
|
||||
ID: "some-title",
|
||||
Text: "Some title",
|
||||
Headers: nil,
|
||||
ID: "some-title",
|
||||
Text: "Some title",
|
||||
Headings: nil,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user