···19const (
20 // RendererTypeRepoMarkdown is for repository documentation markdown files
21 RendererTypeRepoMarkdown RendererType = iota
22- // RendererTypeIssueComment is for issue comments
23- RendererTypeIssueComment
24- // RendererTypePullComment is for pull request comments
25- RendererTypePullComment
26- // RendererTypeDefault is the default renderer with minimal transformations
27- RendererTypeDefault
28)
2930// RenderContext holds the contextual data for rendering markdown.
31-// It can be initialized empty, and that'll skip any transformations
32-// and use the default renderer (RendererTypeDefault).
33type RenderContext struct {
34 Ref string
35 FullRepoName string
···7374 switch a.rctx.RendererType {
75 case RendererTypeRepoMarkdown:
76- a.rctx.relativeLinkTransformer(n.(*ast.Link))
77- case RendererTypeDefault:
78- a.rctx.relativeLinkTransformer(n.(*ast.Link))
79 // more types here like RendererTypeIssue/Pull etc.
80 }
81
···19const (
20 // RendererTypeRepoMarkdown is for repository documentation markdown files
21 RendererTypeRepoMarkdown RendererType = iota
00000022)
2324// RenderContext holds the contextual data for rendering markdown.
25+// It can be initialized empty, and that'll skip any transformations.
026type RenderContext struct {
27 Ref string
28 FullRepoName string
···6667 switch a.rctx.RendererType {
68 case RendererTypeRepoMarkdown:
69+ if v, ok := n.(*ast.Link); ok {
70+ a.rctx.relativeLinkTransformer(v)
71+ }
72 // more types here like RendererTypeIssue/Pull etc.
73 }
74