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

6 lines
310 B
HTML

{{ $html := .Inner | htmlEscape }}
{{ $html := replace $html "((" "<span class='highlight'>" }}
{{ $html := replace $html "))" "</span>" }}
{{ $numbered := .Get "numbered" }}
<div class="code-annotated {{ if and ($numbered) (ne $numbered "false") }}numbered{{ end }}"><code>{{ $html | safeHTML }}</code></div>