bugfix warning message regarding the use of 'IsSet' that could result in <nil>

This commit is contained in:
Andreas Hnida 2024-04-18 11:30:16 +02:00
commit fa5609b285
3 changed files with 4 additions and 2 deletions

2
.prettierignore Normal file
View file

@ -0,0 +1,2 @@
**/*.html

View file

@ -1,5 +1,5 @@
{{/* TODO Add To Docs "top" */}}
<div class="md:flex {{ if isset .Params "center" }}items-center {{ end }}{{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}">
<div class='md:flex {{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}'>
{{ range split (trim .Inner " \n") "..column.." }}
{{ if ne . "" }} <!-- Check if the column content is not empty -->
<!-- Process each column's content through markdownify to ensure consistent HTML output -->

View file

@ -1,5 +1,5 @@
<!-- Columns Container Start -->
<div class="md:flex {{ if isset .Params "center" }}items-center {{ end }}{{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}">
<div class='md:flex {{ with .Get "class" }} {{ . }} {{ else }} mt-6 {{ end }}'>
<!-- Split content into columns based on a unique delimiter, e.g., "..column.." -->
{{ range split (trim .Inner " \n") "..column.." }}
{{ if ne . "" }} <!-- Check if the column content is not empty -->