Markdown support in all shortcodes (#21)

Fixes #20
This commit is contained in:
slashformotion 2021-08-15 14:28:10 +02:00 committed by GitHub
parent 4e38a13914
commit 628637be81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<blockquote cite="{{ .Get "cite" }}"> <blockquote cite="{{ .Get "cite" }}">
<p> <p>
{{ .Inner }} {{ .Inner | markdownify }}
</p> </p>
<footer>{{ .Get "footer" }}</footer> <footer>{{ .Get "footer" }}</footer>
</blockquote> </blockquote>

View file

@ -1,7 +1,7 @@
<div class="epigraph"> <div class="epigraph">
<blockquote> <blockquote>
{{ $t := .Get "type" }} {{ $t := .Get "type" }}
{{ if eq $t "compact" }}{{ .Inner }}{{ else }}<p>{{ .Inner }}</p>{{ end }} {{ if eq $t "compact" }}{{ .Inner | markdownify }}{{ else }}<p>{{ .Inner | markdownify }}</p>{{ end }}
{{ if .IsNamedParams }} {{ if .IsNamedParams }}
<footer> <footer>
{{ with .Get "pre" }}{{ . }}{{ end }} {{ with .Get "pre" }}{{ . }}{{ end }}

View file

@ -1 +1 @@
<span class="newthought">{{ .Inner }}</span> <span class="newthought">{{ .Inner | markdownify }}</span>

View file

@ -1,3 +1,3 @@
{{ $sidenoteDomIdSuffix := .Ordinal }}<label for="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle sidenote-number"></label> {{ $sidenoteDomIdSuffix := .Ordinal }}<label for="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle sidenote-number"></label>
<input type="checkbox" id="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle"/> <input type="checkbox" id="sidenote-{{.Page.File.UniqueID}}-{{ $sidenoteDomIdSuffix }}" class="margin-toggle"/>
<span class="sidenote">{{ .Inner }}</span> <span class="sidenote">{{ .Inner | markdownify }}</span>