cupper-hugo-theme/themes/infusion/layouts/shortcodes/code.html
2017-10-08 13:00:44 +01:00

6 lines
312 B
HTML

{{ $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>