Fix server rebuild issue with partials referenced from render hooks

Fixes #7990
This commit is contained in:
Bjørn Erik Pedersen
2020-11-26 08:32:49 +01:00
parent 7e223b3baa
commit e442cf30a2
6 changed files with 57 additions and 12 deletions

View File

@@ -186,7 +186,7 @@ func (r *hookedRenderer) renderImage(w util.BufWriter, source []byte, node ast.N
},
)
ctx.AddIdentity(h.ImageRenderer.GetIdentity())
ctx.AddIdentity(h.ImageRenderer)
return ast.WalkContinue, err
@@ -248,7 +248,10 @@ func (r *hookedRenderer) renderLink(w util.BufWriter, source []byte, node ast.No
},
)
ctx.AddIdentity(h.LinkRenderer.GetIdentity())
// TODO(bep) I have a working branch that fixes these rather confusing identity types,
// but for now it's important that it's not .GetIdentity() that's added here,
// to make sure we search the entire chain on changes.
ctx.AddIdentity(h.LinkRenderer)
return ast.WalkContinue, err
}
@@ -308,7 +311,7 @@ func (r *hookedRenderer) renderHeading(w util.BufWriter, source []byte, node ast
},
)
ctx.AddIdentity(h.HeadingRenderer.GetIdentity())
ctx.AddIdentity(h.HeadingRenderer)
return ast.WalkContinue, err
}