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

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

%s

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

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

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

Table of Contents

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