From a6425c75102989220121fad57ad1e29fe5bf2605 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Tue, 21 May 2024 20:41:10 -0700 Subject: [PATCH] Always add line numbers (why not?), but specially tag Agda blocks Signed-off-by: Danila Fedorin --- layouts/partials/highlightgroup.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/layouts/partials/highlightgroup.html b/layouts/partials/highlightgroup.html index 0957d8d..31c41e3 100644 --- a/layouts/partials/highlightgroup.html +++ b/layouts/partials/highlightgroup.html @@ -1,9 +1,7 @@ -{{- if eq .language "Agda" -}} -{{- page.Scratch.Set "highlightGroupAttrs" (printf "data-agda-block") -}} {{- if (or .firstLine .lastLine) -}} -{{- page.Scratch.Add "highlightGroupAttrs" (printf " data-agda-first-line=\"%v\" data-agda-last-line=\"%v\"" .firstLine .lastLine) -}} +{{- page.Scratch.Set "highlightGroupAttrs" (printf "data-first-line=\"%v\" data-last-line=\"%v\"" .firstLine .lastLine) -}} {{- end -}} -{{- else -}} -{{- page.Scratch.Set "highlightGroupAttrs" nil -}} +{{- if eq .language "Agda" -}} +{{- page.Scratch.Add "highlightGroupAttrs" " data-agda-block" -}} {{- end -}} {{ partial "group.html" (dict "url" .url "path" .path "comment" .comment "content" (highlight .code .language .opts) "attrs" (page.Scratch.Get "highlightGroupAttrs")) }}