mirror of https://github.com/istio/istio.io.git
Fix handling of SVG files without a viewBox element. (#4960)
This commit is contained in:
parent
50a192392b
commit
2ef3b239ad
|
@ -84,7 +84,7 @@ omit this value and it will be computed automatically.
|
|||
{{- $w := 0.0 -}}
|
||||
{{- $h := 0.0 -}}
|
||||
{{- $viewBox := findRE "viewBox( *?)=( *?)\"(.*?)\"" $file 1 -}}
|
||||
{{- if $viewBox -}}
|
||||
{{- if eq (len $viewBox) 1 -}}
|
||||
{{- $viewBox = index $viewBox 0 -}}
|
||||
{{- $viewBox = index (findRE "[0123456789 \\.]+" $viewBox 1) 0 -}}
|
||||
{{- $sizes := split $viewBox " " -}}
|
||||
|
|
Loading…
Reference in New Issue