From 1eb8a3b600ea9a27d871ef23c787050d80e15181 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Mon, 24 Oct 2022 12:59:05 +0800 Subject: [PATCH] Simplify Heroicon SVG template --- assets/templates/heroicon.svg | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/templates/heroicon.svg b/assets/templates/heroicon.svg index 1bb5e93..beb8f9f 100644 --- a/assets/templates/heroicon.svg +++ b/assets/templates/heroicon.svg @@ -1,9 +1,8 @@ {{- /* This template applies an ID to an SVG from the Heroicons set to be used with `` element. */ -}} -{{- $match := "\\s*(.*)\\s*" }} +{{- $match := "^\\s*" }} {{- $icon := resources.Get (printf "svg/heroicons/24/solid/%s.svg" .) }} -{{- $replaceWith := printf `${2}` . }} - -{{- replaceRE $match $replaceWith $icon.Content | safeHTML }} +{{- $replaceWith := printf `` . }} +{{- replaceRE $match $replaceWith $icon.Content | safeHTML -}}