blob: f5c0e13b729fe4a065a426d0e7f270f3fe6dc333 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
{{ $options := .Attributes.options | default "default=1" }}
{{ $caption := .Attributes.caption }}
<code-block {{ if in (lower $options) "linenos" }}data-lines{{ end }}>
<header>
<language-label>
{{ .Type }}
</language-label>
<button>
{{ safeHTML (readFile (print (partial "function-paths-static.html") "/icons/feather/copy.svg")) }}
<span>Copy</span>
</button>
</header>
{{ highlight .Inner .Type (print $options ",lineAnchors=" "code-" (truncate 7 "" (md5 .Inner))) }}
</code-block>
{{ with $caption }}
<footer>{{ . | markdownify }}</footer>
{{ end }}
|