1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 08:12:11 +00:00

Remove deprecated "doc-endnote" DPUB-ARIA role

Temporary measure for use with Goldmark till it drops this

see https://github.com/yuin/goldmark/issues/258
This commit is contained in:
Rohan Kumar 2022-04-05 21:41:08 -07:00
parent 0666dcd715
commit 613eba7ccf
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -1,10 +1,14 @@
{{ if .Params.footnote_heading -}} {{ if .Params.footnote_heading -}}
{{ $references := `(<section class="footnotes" role="doc-endnotes"> {{ $references := `(<section class="footnotes" role="doc-endnotes">
<hr>)` -}} <hr>)` -}}
{{ $heading := .Params.footnote_heading -}} {{ $heading := .Params.footnote_heading -}}
{{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labelledby="note-hd"> {{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labelledby="note-hd">
<h2 id="note-hd">%s</h2>` ($heading) -}} <h2 id="note-hd">%s</h2>` ($heading) -}}
{{ .Content | replaceRE $references $referencesWithHeading | safeHTML -}}
{{ $endnote := `(role="doc-endnote")` }}
{{ $noEndnote := printf "" }}
{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | safeHTML -}}
{{ else -}} {{ else -}}
{{ .Content -}} {{ .Content -}}
{{ end -}} {{ end -}}