package attributes_test import ( "testing" "github.com/gohugoio/hugo/hugolib" ) func TestDescriptionListAutoID(t *testing.T) { t.Parallel() files := ` -- hugo.toml -- [markup.goldmark.parser] autoHeadingID = true autoDefinitionTermID = true autoIDType = 'github-ascii' -- content/p1.md -- --- title: "Title" --- ## Title with id set {#title-with-id} ## Title with id set duplicate {#title-with-id} ## My Title Base Name : Base name of the file. Base Name : Duplicate term name. My Title : Term with same name as title. Foo@Bar : The foo bar. foo [something](/a/b/) bar : A foo bar. 良善天父 : The good father. Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď : Testing accents. Mutiline set text header Second line --------------- -- layouts/_default/single.html -- {{ .Content }}|Identifiers: {{ .Fragments.Identifiers }}| ` b := hugolib.Test(t, files) b.AssertFileContent("public/p1/index.html", `
Base Name
`, `
Base Name
`, `
Foo@Bar
`, `

My Title

`, `
foo something bar
`, `

Title with id set

`, `

Title with id set duplicate

`, `
My Title
`, `
良善天父
`, `
Ā ā Ă ă Ą ą Ć ć Ĉ ĉ Ċ ċ Č č Ď
`, `

Mutiline set text header`, "|Identifiers: [a-a-a-a-a-a-c-c-c-c-c-c-c-c-d base-name base-name-1 foo-something-bar foobar my-title my-title-1 second-line term title-with-id title-with-id]|", ) }