You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
620 B
XML
21 lines
620 B
XML
{{ $content := .InnerDeindent | strings.TrimLeft "\f\n\r\v" | strings.TrimRight "\f\n\r\t\v " }}
|
|
{{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }}
|
|
{{ $options := .Get "options" }}
|
|
{{ $unescape := .Get "unescape" }}
|
|
|
|
{{ if not $content }}
|
|
{{ errorf "layouts/shortcodes/paige/code.xml: no content" }}
|
|
{{ end }}
|
|
|
|
{{ if $options }}
|
|
{{ $options = printf "%s,noclasses=true" $options }}
|
|
{{ else }}
|
|
{{ $options = "noclasses=true" }}
|
|
{{ end }}
|
|
|
|
{{ if $unescape }}
|
|
{{ $content = htmlUnescape $content }}
|
|
{{ end }}
|
|
|
|
<div class="paige-shortcode-code">{{ highlight $content $lang $options }}</div>
|