Skip to content

Commit bf4075a

Browse files
committed
Added inline-icon shortcode to fix whitespace formatting issue with inline images and lists
1 parent 6be6ab1 commit bf4075a

File tree

3 files changed

+17
-4
lines changed

3 files changed

+17
-4
lines changed

content/operate/rs/monitoring/v1_monitoring.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ In **Cluster > Alert Settings**, you can enable alerts for node or cluster eve
102102

103103
Configured alerts are shown:
104104

105-
- As a notification on the status icon ( {{< image filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" class="inline" >}} ) for the node and cluster
105+
- As a notification on the status icon ( {{< inline-icon filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" >}} ) for the node and cluster
106106
- In the **log**
107107
- In email notifications, if you configure [email alerts](#send-alerts-by-email)
108108

@@ -122,7 +122,7 @@ For each database, you can enable alerts for database events, such as high memor
122122

123123
Configured alerts are shown:
124124

125-
- As a notification on the status icon ( {{< image filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" class="inline" >}} ) for the database
125+
- As a notification on the status icon ( {{< inline-icon filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" >}} ) for the database
126126
- In the **log**
127127
- In emails, if you configure [email alerts](#send-alerts-by-email)
128128

content/operate/rs/references/alerts/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ In **Cluster > Alert Settings**, you can enable alerts for node or cluster eve
2020

2121
Configured alerts are shown:
2222

23-
- As a notification on the status icon ( {{< image filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" class="inline" >}} ) for the node and cluster
23+
- As a notification on the status icon ( {{< inline-icon filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" >}} ) for the node and cluster
2424
- In the **log**
2525
- In email notifications, if you configure [email alerts](#send-alerts-by-email)
2626

@@ -40,7 +40,7 @@ For each database, you can enable alerts for database events, such as high memor
4040

4141
Configured alerts are shown:
4242

43-
- As a notification on the status icon ( {{< image filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" class="inline" >}} ) for the database
43+
- As a notification on the status icon ( {{< inline-icon filename="/images/rs/icons/icon_warning.png#no-click" alt="Warning" width="18px" >}} ) for the database
4444
- In the **log**
4545
- In emails, if you configure [email alerts](#send-alerts-by-email)
4646

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{{ $fname := .Get "filename" | strings.TrimLeft "/" }}
2+
{{ $cleanFname := $fname | strings.TrimSuffix "#no-click" }}
3+
{{ $noClick := strings.HasSuffix $fname "#no-click" }}
4+
{{ if not (hasPrefix $cleanFname "/") }}
5+
{{ .Scratch.Set "file" (printf "/%s" $cleanFname) }}
6+
{{ else }}
7+
{{ .Scratch.Set "file" $cleanFname }}
8+
{{ end }}
9+
<img src='{{ relURL $cleanFname }}'
10+
{{ with .Get "width" }} width="{{.}}"{{ end }}
11+
{{ with .Get "height" }} height="{{.}}"{{ end }}
12+
{{ with .Get "alt"}} alt="{{.}}"{{ end }}
13+
class="inline align-middle m-0 p-0{{ if $noClick }} pointer-events-none cursor-default{{ end }}{{ with .Get "class" }} {{.}}{{ end }}"/>

0 commit comments

Comments
 (0)