remove iconHeight regex for iconSVG

This commit is contained in:
Aniket Teredesai 2022-07-17 01:18:56 +05:30
parent 3b81ff905b
commit 24808b64da

View File

@ -67,7 +67,7 @@
height="{{- site.Params.label.iconHeight | default "30" -}}">
{{- end -}}
{{- else if hasPrefix site.Params.label.iconSVG "<svg" }}
{{ site.Params.label.iconSVG | replaceRE `\s*height\s*=\s*"[\w\s]*"|\s*width\s*=\s*"[\w\s]*"` "" | replaceRE "^<svg" (printf `<svg height="%d"` site.Params.label.iconHeight) | safeHTML }}
{{ site.Params.label.iconSVG | safeHTML }}
{{- end -}}
{{- $label_text -}}
</a>