{{- $footnote_heading := printf "Footnotes" -}} {{- if .Params.footnote_heading -}} {{- $footnote_heading = .Params.footnote_heading -}} {{- end -}} {{- $referencesWithoutHeading := `(

)` -}} {{- $referencesWithHeading := printf `

%s

` ($footnote_heading) -}} {{- $endnotesClosingDiv := `

` -}} {{- $endnotesClosingSection := printf `

` -}} {{- $badNoteRef := ` role="doc-noteref">([0-9]*)` -}} {{- $goodNoteRef := ` role="doc-noteref">note ${1}` -}} {{- $endnote := `(role="doc-endnote"|class="footnote-(back)?ref")` -}} {{- $noEndnote := printf "" -}} {{- $tocHeadingOutside := `

Table of Contents

` -}} {{- $tocHeadingInside := `