mirror of
https://github.com/go-gitea/gitea
synced 2025-07-19 08:48:37 +00:00
Open markdown image links in new window (#17287)
This commit is contained in:
@@ -114,6 +114,7 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa
|
||||
wrap := ast.NewLink()
|
||||
wrap.Destination = link
|
||||
wrap.Title = v.Title
|
||||
wrap.SetAttributeString("target", []byte("_blank"))
|
||||
|
||||
// Duplicate the current image node
|
||||
image := ast.NewImage(ast.NewLink())
|
||||
|
Reference in New Issue
Block a user