🐛 Fix: Check if content is empty beforing passing

This commit is contained in:
Cell
2021-12-28 21:30:45 +08:00
parent b6bc9ceb65
commit b346679cc7
2 changed files with 14 additions and 9 deletions
+1
View File
@@ -9,6 +9,7 @@
- :arrow_up: Chore: update all third-party libraries
- :wrench: Chore: minify card-link background image
- :wrench: Chore(i18n): change some translations
- :bug: Fix: Check if content is empty beforing passing
## v0.2.11
+13 -9
View File
@@ -1,19 +1,23 @@
{{- $content := .Content -}}
{{- if .Ruby -}}
{{- if ne "" $content -}}
{{- if .Ruby -}}
{{- $content = partial "function/ruby.html" $content -}}
{{- end -}}
{{- end -}}
{{- if .Fraction -}}
{{- if .Fraction -}}
{{- $content = partial "function/fraction.html" $content -}}
{{- end -}}
{{- end -}}
{{- if .Fontawesome -}}
{{- if .Fontawesome -}}
{{- $content = partial "function/fontawesome.html" $content -}}
{{- end -}}
{{- $content = partial "function/checkbox.html" $content -}}
{{- $content = partial "function/escape.html" $content -}}
{{- end -}}
{{- $content = partial "function/checkbox.html" $content -}}
{{- $content = partial "function/escape.html" $content -}}
{{- return $content -}}