2021-01-18 01:18:02 +00:00
|
|
|
{{ if .Params.footnote_heading -}}
|
2021-01-18 03:42:07 +00:00
|
|
|
{{ $references := `(<section class="footnotes" role="doc-endnotes">
|
|
|
|
<hr>)` -}}
|
2021-01-18 01:18:02 +00:00
|
|
|
{{ $heading := .Params.footnote_heading -}}
|
2021-01-18 03:42:07 +00:00
|
|
|
{{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labeledby="note-hd">
|
|
|
|
<h2 id="note-hd">%s</h2>` ($heading) -}}
|
2021-01-18 01:18:02 +00:00
|
|
|
{{ .Content | replaceRE $references $referencesWithHeading | safeHTML -}}
|
2021-01-18 03:42:07 +00:00
|
|
|
{{ else -}}
|
|
|
|
{{ .Content -}}
|
2021-01-18 01:18:02 +00:00
|
|
|
{{ end -}}
|