From 613eba7ccf7903f3b22bc7e84981a0ca12aee5f3 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Tue, 5 Apr 2022 21:41:08 -0700 Subject: [PATCH] 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 --- layouts/partials/processed-content.html | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/layouts/partials/processed-content.html b/layouts/partials/processed-content.html index 31d8f2e..5391f6c 100644 --- a/layouts/partials/processed-content.html +++ b/layouts/partials/processed-content.html @@ -1,10 +1,14 @@ {{ if .Params.footnote_heading -}} + {{ $references := `(

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

%s

` ($heading) -}} - {{ .Content | replaceRE $references $referencesWithHeading | safeHTML -}} + +{{ $endnote := `(role="doc-endnote")` }} +{{ $noEndnote := printf "" }} +{{ .Content | replaceRE $references $referencesWithHeading | replaceRE $endnote $noEndnote | safeHTML -}} {{ else -}} {{ .Content -}} {{ end -}}