{{ if .Params.footnote_heading -}} {{ $references := `(

)` -}} {{ $heading := .Params.footnote_heading -}} {{ $referencesWithHeading := printf `

%s

` ($heading) -}} {{ $endnote := `(role="doc-endnote")` }} {{ $noEndnote := printf "" }} {{ $preWithoutTabIndex := `
` }}
{{ $preWithTabIndex := `
` }}

{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | replaceRE $preWithoutTabIndex $preWithTabIndex | safeHTML -}}
{{ else -}}
{{ .Content -}}
{{ end -}}