mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-27 14:12:09 +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:
parent
0666dcd715
commit
613eba7ccf
1 changed files with 7 additions and 3 deletions
|
@ -1,10 +1,14 @@
|
|||
{{ if .Params.footnote_heading -}}
|
||||
|
||||
{{ $references := `(<section class="footnotes" role="doc-endnotes">
|
||||
<hr>)` -}}
|
||||
{{ $heading := .Params.footnote_heading -}}
|
||||
{{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labelledby="note-hd">
|
||||
{{ $heading := .Params.footnote_heading -}}
|
||||
{{ $referencesWithHeading := printf `<section class="footnotes" role="doc-endnotes" aria-labelledby="note-hd">
|
||||
<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 -}}
|
||||
{{ .Content -}}
|
||||
{{ end -}}
|
||||
|
|
Loading…
Reference in a new issue