Skip to content

Commit d9def24

Browse files
committed
Callout: Remove whitespace when icon not included
1 parent e2ddf85 commit d9def24

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

exampleSite/content/test-product/tab-group/tab-group.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,22 @@ weight: 200
88

99
{{<tabs name="common_steps_for_nginx_oss_and_plus">}}
1010

11+
{{%tab name="Call Outs"%}}
12+
13+
{{<call-out "caution call-out" "Deprecated documentation notice" "fa fa-exclamation-triangle" >}}
14+
This is a callout with an icon.
15+
{{</call-out>}}
16+
17+
{{<caution>}}
18+
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 `<caution>` shortcode. It has no custom title.
19+
{{</caution>}}
20+
21+
{{<call-out "" "Custom title">}}
22+
This is a plain callout with a title. It has a [link](#plain-callouts) to a heading on this page. Its shortcode is `<call-out>` with a custom title parameter.
23+
{{</call-out>}}
24+
25+
{{%/tab%}}
26+
1127
{{%tab name="Ordered List With Code Block types"%}}
1228

1329
1. Create the `/etc/ssl/nginx` directory:
@@ -40,6 +56,8 @@ nginx -s reload
4056
```
4157

4258
{{%/tab%}}
59+
60+
4361
{{</tabs>}}
4462

4563

layouts/partials/callout.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
{{/* Old frame callout */}}
2525
<blockquote class="{{ $class }}" data-mf="false">
2626
<div>
27-
{{ with $icon }}
27+
{{- with $icon -}}
2828
<i class="{{ . }}"></i>
29-
{{ end }}
29+
{{- end -}}
3030
<strong>{{ $title }}</strong>
3131
{{ .content | markdownify }}
3232
</div>
@@ -59,7 +59,7 @@
5959
</div>
6060
</blockquote>
6161
</div>
62-
62+
6363
{{ else }}
6464

6565
{{/* "Generic" mf callout */}}
@@ -68,13 +68,13 @@
6868

6969
<blockquote class="{{ $class }} note" data-mf="true" style="display: none;" data-title="{{ $cleanTitle }}">
7070
<div class="callout-content">
71-
{{ with $icon }}
71+
{{- with $icon -}}
7272
<i class="{{ . }}"></i>
73-
{{ end }}
73+
{{- end -}}
7474
<div class="callout-content">
7575
{{ .content | markdownify }}
7676
</div>
7777
</div>
7878
</blockquote>
7979

80-
{{ end }}
80+
{{ end }}

0 commit comments

Comments
 (0)