collapse shortcode content can write formative code and change line (#561)

This commit is contained in:
drizzle 2021-09-17 21:11:23 +08:00 committed by GitHub
parent 4e9b04784b
commit 8c2f997ab3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,8 @@
{{ if .Get "content" }}
{{ if .Get "summary" }} {{ if .Get "summary" }}
{{ else }} {{ else }}
{{ warnf "missing value for param 'summary': %s" .Position }} {{ warnf "missing value for param 'summary': %s" .Position }}
{{ end }} {{ end }}
{{ else }}
{{ errorf "missing value for param 'content': %s" .Position }}
{{ end }}
<p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}> <p><details {{ if (eq (.Get "openByDefault") true) }} open=true {{ end }}>
<summary markdown="span">{{ .Get "summary" | markdownify }}</summary> <summary markdown="span">{{ .Get "summary" | markdownify }}</summary>
{{ .Get "content" | markdownify }} {{ .Inner | markdownify }}
</details></p> </details></p>