fix rendering animated svg with plugins
This commit is contained in:
parent
9a339e5e55
commit
b20ef22eaa
1 changed files with 9 additions and 3 deletions
|
|
@ -617,6 +617,10 @@ func compile(ctx context.Context, ms *xmain.State, plugins []d2plugin.Plugin, fs
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, false, err
|
return nil, false, err
|
||||||
}
|
}
|
||||||
|
out, err = plugin.PostProcess(ctx, out)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
err = os.MkdirAll(filepath.Dir(outputPath), 0755)
|
err = os.MkdirAll(filepath.Dir(outputPath), 0755)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, false, err
|
return nil, false, err
|
||||||
|
|
@ -858,9 +862,11 @@ func _render(ctx context.Context, ms *xmain.State, plugin d2plugin.Plugin, opts
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
svg, err = plugin.PostProcess(ctx, svg)
|
if opts.MasterID == "" {
|
||||||
if err != nil {
|
svg, err = plugin.PostProcess(ctx, svg)
|
||||||
return svg, err
|
if err != nil {
|
||||||
|
return svg, err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cacheImages := ms.Env.Getenv("IMG_CACHE") == "1"
|
cacheImages := ms.Env.Getenv("IMG_CACHE") == "1"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue