Generate source offset in HTML
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -6,4 +6,7 @@
|
||||
{{- if eq (lower .language) "agda" -}}
|
||||
{{- $scratch.Add "highlightGroupAttrs" " data-agda-block" -}}
|
||||
{{- end -}}
|
||||
{{- with .offset -}}
|
||||
{{- $scratch.Add "highlightGroupAttrs" (printf " data-source-offset=\"%v\"" .) -}}
|
||||
{{- end -}}
|
||||
{{ partial "group.html" (dict "url" .url "path" .path "comment" .comment "content" (highlight .code .language .opts) "attrs" ($scratch.Get "highlightGroupAttrs")) }}
|
||||
|
||||
Reference in New Issue
Block a user