For Agda code blocks, thread through line numbers
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
67da389005
commit
52ea5abbc8
|
@ -1 +1,9 @@
|
||||||
{{ partial "group.html" (dict "url" .url "path" .path "comment" .comment "content" (highlight .code .language .opts)) }}
|
{{- 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) -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- page.Scratch.Set "highlightGroupAttrs" nil -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{ partial "group.html" (dict "url" .url "path" .path "comment" .comment "content" (highlight .code .language .opts) "attrs" (page.Scratch.Get "highlightGroupAttrs")) }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user