From 77d6816045263f6a316c6a280c6fe29da54670f7 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Thu, 4 Jul 2024 09:57:10 +0200 Subject: [PATCH] Make icon plugin more strict (#33562) --- plugins/icon.rb | 4 ++-- source/dashboards/cards.markdown | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/icon.rb b/plugins/icon.rb index 95d45b58bdc..268bd6a7354 100644 --- a/plugins/icon.rb +++ b/plugins/icon.rb @@ -13,7 +13,7 @@ module Jekyll #{args} Valid syntax: - {% icon "" %} + {% icon ":" %} MSG end end @@ -24,7 +24,7 @@ module Jekyll private - SYNTAX = %r!^"(.+?)"$!.freeze + SYNTAX = %r!^"([a-z0-9]+(?:-[a-z0-9]+)*:[a-z0-9]+(?:-[a-z0-9]+)*)"$!.freeze end end end diff --git a/source/dashboards/cards.markdown b/source/dashboards/cards.markdown index d457e80322b..4fbf8ed25dd 100644 --- a/source/dashboards/cards.markdown +++ b/source/dashboards/cards.markdown @@ -112,7 +112,7 @@ In [sections view](/dashboards/sections/), you can resize cards. Follow these st If you previously [resized](#resizing-a-card) a card in the [sections view](/dashboards/sections/), and you don't like the new size, you can revert back to the card's default size. Follow these steps: -1. On the **Layout** tab, select the {% icon "mdi-restore" %} icon. +1. On the **Layout** tab, select the {% icon "mdi:restore" %} icon. ![Screenshot of the Layout tab in the card dialog](/images/dashboards/card_resize.png) 2. Select **Save**.