Files
FixIt/layouts/_default/_markup/render-codeblock.html
T
2023-06-11 18:43:08 +08:00

4 lines
278 B
HTML

{{- $id := dict "Content" .Attributes "Scratch" .Page.Scratch | partial "function/id.html" -}}
{{- $codeBlock := transform.Highlight .Inner .Type .Options -}}
{{- replace $codeBlock "<div class=\"highlight\">" (printf "<div class=\"highlight\" id=\"%v\">" $id) 1 | safeHTML -}}