infidel-cupper-theme/layouts/shortcodes/code.html

6 lines
312 B
HTML
Raw Permalink Normal View History

2022-04-10 04:20:41 -04:00
{{ $code := .Inner | htmlEscape }}
{{ $code := replace $code "[[[" "<span class='highlight'>" }}
{{ $code := replace $code "]]]" "</span>" }}
{{ $numbered := .Get "numbered" }}
<div class="code-annotated {{ if and ($numbered) (ne $numbered "false") }}numbered{{ end }}"><code>{{ $code | safeHTML }}</code></div>