File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 22{{ $codeBlockId := printf "id-%x" (now.UnixNano) }}
33{{ $lines := split $result.Wrapped "\n" }}
44{{ $isSingleLine := eq (len $lines) 1 }}
5+ {{- $opts := dict "noClasses" false -}}
6+ {{- $lang := .Type -}}
7+ {{- $highlightingResult := transform.HighlightCodeBlock . $opts -}}
58
69{{- if $isSingleLine -}}
710< div class ="code-block " data-mf ="true " style ="display: none; ">
2023 < div class ="code-container chroma ">
2124 < button onclick ="copyToClipBoard(this, {{ $codeBlockId }}) " class ="code-copy-button multi-line " type ="button "> Copy</ button >
2225 < div class ="highlight-v2 " id ="{{ $codeBlockId }} ">
23- {{ $result.Wrapped }}
26+ < div class =" highlight " > < pre class =" chroma " tabindex =" 0 " > < code class =" language- {{ $lang }} " data-lang =" {{ $lang }} " > {{- $highlightingResult.Inner -}} </ code > </ pre > </ div >
2427 </ div >
2528 </ div >
2629</ div >
30+
2731{{- end -}}
2832< div id ="code-block-v1 " data-mf ="false ">
2933{{ $result.Wrapped }}
You can’t perform that action at this time.
0 commit comments