mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-05-28 12:00:01 +02:00
Open markdown image links in new window (#17287)
This commit is contained in:
parent
758c8c8446
commit
d8e06a90f0
2 changed files with 8 additions and 4 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue