diff options
Diffstat (limited to 'markup/goldmark')
-rw-r--r-- | markup/goldmark/convert.go | 4 | ||||
-rw-r--r-- | markup/goldmark/render_hooks.go | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/markup/goldmark/convert.go b/markup/goldmark/convert.go index ffe9cd45a..2a66cc184 100644 --- a/markup/goldmark/convert.go +++ b/markup/goldmark/convert.go @@ -202,7 +202,7 @@ type renderContext struct { type renderContextData interface { RenderContext() converter.RenderContext DocumentContext() converter.DocumentContext - AddIdentity(id identity.Identity) + AddIdentity(id identity.Provider) } type renderContextDataHolder struct { @@ -219,7 +219,7 @@ func (ctx *renderContextDataHolder) DocumentContext() converter.DocumentContext return ctx.dctx } -func (ctx *renderContextDataHolder) AddIdentity(id identity.Identity) { +func (ctx *renderContextDataHolder) AddIdentity(id identity.Provider) { ctx.ids.Add(id) } diff --git a/markup/goldmark/render_hooks.go b/markup/goldmark/render_hooks.go index aaae68e7f..c541cbba4 100644 --- a/markup/goldmark/render_hooks.go +++ b/markup/goldmark/render_hooks.go @@ -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 } |