Skip to content

Commit

Permalink
feat: links are now target blank
Browse files Browse the repository at this point in the history
  • Loading branch information
thexyno committed Aug 28, 2023
1 parent 9bcc479 commit b1fb431
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func Render(post db.Post) []byte {
}

parser := parser.NewWithExtensions(parser.CommonExtensions | parser.AutoHeadingIDs)
opts := html.RendererOptions{Flags: html.CommonFlags, RenderNodeHook: renderHook}
opts := html.RendererOptions{Flags: html.CommonFlags | html.HrefTargetBlank | html.FootnoteReturnLinks, RenderNodeHook: renderHook}
renderer := html.NewRenderer(opts)
bytes := markdown.ToHTML([]byte(post.Content), parser, renderer)
renderCache.Store(idu, bytes)
Expand Down

0 comments on commit b1fb431

Please sign in to comment.