Breaking change: switch to '{{%' decorators in shortcodes to better support shortcode-in-shortcode

This commit is contained in:
Alex Shpak
2024-10-04 11:29:44 +02:00
parent 69886cc74b
commit 925dbd3b9f
21 changed files with 61 additions and 91 deletions
+1 -1
View File
@@ -8,5 +8,5 @@
{{- $ref = relref $ . -}}
{{- end -}}
<a {{ with $ref }} href="{{.}}" {{ end }} {{ with $target }} target="{{.}}" rel="noopener" {{ end }} class="book-btn{{ with .Get "class" }} {{ . }}{{ end }}">
{{ .InnerDeindent | .Page.RenderString }}
{{ .InnerDeindent }}
</a>
+2 -2
View File
@@ -1,7 +1,7 @@
<div class="book-columns flex flex-wrap">
{{ range split .Inner "<--->" }}
{{ range split .InnerDeindent "<--->" }}
<div class="flex-even markdown-inner">
{{ . | $.Page.RenderString }}
{{ . | safeHTML }}
</div>
{{ end }}
</div>
+2 -2
View File
@@ -1,7 +1,7 @@
<details {{ if or (.Get "open") (in .Params "open") }}open{{ end }}>
{{- $summary := cond .IsNamedParams (.Get "title") (.Get 0) -}}
<summary>{{ $summary | .Page.RenderString }}</summary>
<summary>{{ $summary }}</summary>
<div class="markdown-inner">
{{ .InnerDeindent | .Page.RenderString }}
{{ .InnerDeindent | safeHTML }}
</div>
</details>
+1 -1
View File
@@ -1,3 +1,3 @@
<blockquote class="book-hint {{ .Get 0 }}">
{{ .InnerDeindent | .Page.RenderString }}
{{ .InnerDeindent | safeHTML }}
</blockquote>
+1 -1
View File
@@ -1 +1 @@
{{- .Inner -}}
{{- .Inner | safeHTML -}}
+1 -1
View File
@@ -8,6 +8,6 @@
<span {{- with .Get "class" }} class="{{ . }}"{{ end }}>
{{ with .Get "display" }}\[{{else}}\({{end}}
{{- trim .Inner "\n" -}}
{{- .InnerDeindent -}}
{{ with .Get "display" }}\]{{else}}\){{end}}
</span>
+1 -1
View File
@@ -8,5 +8,5 @@
{{ end }}
<pre class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
{{- .Inner | safeHTML -}}
{{- .Inner -}}
</pre>
+1 -1
View File
@@ -8,7 +8,7 @@
{{- $tab.Name -}}
</label>
<div class="book-tabs-content markdown-inner">
{{- .Content | $.Page.RenderString -}}
{{- .Content | safeHTML -}}
</div>
{{- end -}}
</div>