From a8dee4aaa2e8fe58b6a050a74f30b28ae9b6d392 Mon Sep 17 00:00:00 2001 From: Jack Hickey <133868041+nginx-jack@users.noreply.github.com> Date: Fri, 16 May 2025 10:53:41 +0100 Subject: [PATCH] Callout: Remove whitespace when icon not included --- .../test-product/tab-group/tab-group.md | 18 ++++++++++++++++++ layouts/partials/callout.html | 12 ++++++------ 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/exampleSite/content/test-product/tab-group/tab-group.md b/exampleSite/content/test-product/tab-group/tab-group.md index 190e293..321c6c1 100644 --- a/exampleSite/content/test-product/tab-group/tab-group.md +++ b/exampleSite/content/test-product/tab-group/tab-group.md @@ -8,6 +8,22 @@ weight: 200 {{}} +{{%tab name="Call Outs"%}} + +{{}} +This is a callout with an icon. +{{}} + +{{}} +This is a Caution callout. There was previously a bug with **bold text** that we should be aware of and continue to check for. This callout was invoked with the `` shortcode. It has no custom title. +{{}} + +{{}} +This is a plain callout with a title. It has a [link](#plain-callouts) to a heading on this page. Its shortcode is `` with a custom title parameter. +{{}} + +{{%/tab%}} + {{%tab name="Ordered List With Code Block types"%}} 1. Create the `/etc/ssl/nginx` directory: @@ -40,6 +56,8 @@ nginx -s reload ``` {{%/tab%}} + + {{}} diff --git a/layouts/partials/callout.html b/layouts/partials/callout.html index 9cb4796..616bfe0 100644 --- a/layouts/partials/callout.html +++ b/layouts/partials/callout.html @@ -24,9 +24,9 @@ {{/* Old frame callout */}}
- {{ with $icon }} + {{- with $icon -}} - {{ end }} + {{- end -}} {{ $title }} {{ .content | markdownify }}
@@ -59,7 +59,7 @@
- + {{ else }} {{/* "Generic" mf callout */}} @@ -68,13 +68,13 @@ -{{ end }} \ No newline at end of file +{{ end }}