2022-11-26 03:28:34PM

This commit is contained in:
Alexander Wang 2022-11-26 15:28:34 -08:00
parent b1ed73a615
commit d8e33fbb59
No known key found for this signature in database
GPG key ID: D89FA31966BDBECE

View file

@ -206,14 +206,14 @@ func compile(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, theme
return nil, err return nil, err
} }
out := svg
if filepath.Ext(outputPath) == ".png" {
// TODO this may be desirable even for SVGs. Should make it a flag // TODO this may be desirable even for SVGs. Should make it a flag
svg, err = imgbundler.Inline(ms, svg) svg, err = imgbundler.Inline(ms, svg)
if err != nil { if err != nil {
return nil, err return nil, err
} }
out := svg
if filepath.Ext(outputPath) == ".png" {
out, err = png.ConvertSVG(ms, page, svg) out, err = png.ConvertSVG(ms, page, svg)
if err != nil { if err != nil {
return nil, err return nil, err