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

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

%s

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

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

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

Table of Contents

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