mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-08 07:49:50 +02:00
Fix markdown image with link (#4675)
* Fix markdown image with link * Add gitea copyright notice * add a test for markdown image with link * remove svg related variables
This commit is contained in:
1 parent
10370651fc
commit
b686bd0c94
2 files changed
+21
-22
No files matched your search
@@ -73,6 +73,7 @@ func TestRender_Images(t *testing.T) {
|
||||
|
||||
url := "../../.images/src/02/train.jpg"
|
||||
title := "Train"
|
||||
href := "https://gitea.io"
|
||||
result := util.URLJoin(AppSubURL, url)
|
||||
|
||||
test(
|
||||
@@ -82,6 +83,9 @@ func TestRender_Images(t *testing.T) {
|
||||
test(
|
||||
"[["+title+"|"+url+"]]",
|
||||
`<p><a href="`+result+`" rel="nofollow"><img src="`+result+`" title="`+title+`" alt="`+title+`"/></a></p>`)
|
||||
test(
|
||||
"[]("+href+")",
|
||||
`<p><a href="`+href+`" rel="nofollow"><img src="`+result+`" alt="`+title+`"/></a></p>`)
|
||||
}
|
||||
|
||||
func testAnswers(baseURLContent, baseURLImages string) []string {
|
||||
|
||||
Reference in new issue
Block a user