Fail if no content for all shortcodes
parent
22ce6fb1fc
commit
754926f6c0
@ -1,4 +1,9 @@
|
||||
{{ $content := .Inner | replaceRE "^\n" "" }}
|
||||
{{ $lang := .Get 0 | default (.Get "lang") | default "plaintext" }}
|
||||
{{ $options := .Get "options" }}
|
||||
|
||||
<div class="paige-code">{{ highlight (.Inner | replaceRE "^\n" "") $lang $options }}</div>
|
||||
{{ if not $content }}
|
||||
{{ errorf "paige/code: no content" }}
|
||||
{{ end }}
|
||||
|
||||
<div class="paige-code">{{ highlight $content $lang $options }}</div>
|
||||
|
@ -1,5 +1,9 @@
|
||||
{{ $content := .Inner | replaceRE "^\n" "" | replaceRE "\n$" "" | markdownify }}
|
||||
|
||||
{{ if not $content }}
|
||||
{{ errorf "paige/quote: no content" }}
|
||||
{{ end }}
|
||||
|
||||
<div class="paige-quote">
|
||||
<blockquote class="blockquote">{{ $content }}</blockquote>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue