cupper-hugo-theme/layouts/shortcodes/html.html

6 lines
310 B
HTML
Raw Normal View History

2017-11-02 16:39:45 +01:00
{{ $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>