mirror of
https://gitee.com/gitea/gitea
synced 2025-11-30 13:20:25 +08: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