Update lib/png/png.go
Co-authored-by: Anmol Sethi <anmol@terrastruct.com>
This commit is contained in:
parent
0f95288b5c
commit
24aa08bb2b
1 changed files with 1 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ func ConvertSVG(ms *xmain.State, page playwright.Page, svg []byte) (outputImage
|
|||
if len(pngString) > 50 {
|
||||
pngString = pngString[0:50] + "..."
|
||||
}
|
||||
return nil, fmt.Errorf("invalid PNG: %v\nplease report this issue here: https://github.com/terrastruct/d2/issues/new", pngString)
|
||||
return nil, fmt.Errorf("invalid PNG: %q\nplease report this issue here: https://github.com/terrastruct/d2/issues/new", pngString)
|
||||
}
|
||||
splicedPNGString := pngString[len(pngPrefix):]
|
||||
return base64.StdEncoding.DecodeString(splicedPNGString)
|
||||
|
|
|
|||
Loading…
Reference in a new issue