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:
parent
0666dcd715
commit
613eba7ccf
1 changed files with 7 additions and 3 deletions
|
@ -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 -}}
|
||||||
|
|
Loading…
Reference in a new issue