Fix external renderer (#16401)
* fix external renderer * use GBackground context as fallback * no fallback, return error Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
parent
fb04cc7dbd
commit
46a4c6835d
2 changed files with 7 additions and 0 deletions
4
modules/markup/external/external.go
vendored
4
modules/markup/external/external.go
vendored
|
@ -98,6 +98,10 @@ func (p *Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.
|
|||
args = append(args, f.Name())
|
||||
}
|
||||
|
||||
if ctx == nil || ctx.Ctx == nil {
|
||||
return fmt.Errorf("RenderContext did not provide context")
|
||||
}
|
||||
|
||||
processCtx, cancel := context.WithCancel(ctx.Ctx)
|
||||
defer cancel()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue