aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markup/markdown/markdown_test.go
diff options
context:
space:
mode:
authorL.E.R <LER0ever@users.noreply.github.com>2018-10-30 17:26:28 -0500
committertechknowlogick <hello@techknowlogick.com>2018-10-30 18:26:28 -0400
commitb686bd0c9467885308a8e45214e75ee270c084e2 (patch)
tree1a7fea87e2c1faa374288aa79e5ccbcc245e42a0 /modules/markup/markdown/markdown_test.go
parent10370651fcd14b61524e1dd1ca941af640916814 (diff)
downloadgitea-b686bd0c9467885308a8e45214e75ee270c084e2.tar.gz
gitea-b686bd0c9467885308a8e45214e75ee270c084e2.zip
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
Diffstat (limited to 'modules/markup/markdown/markdown_test.go')
-rw-r--r--modules/markup/markdown/markdown_test.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go
index 605094df46..a5ab84e0ec 100644
--- a/modules/markup/markdown/markdown_test.go
+++ b/modules/markup/markdown/markdown_test.go
@@ -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(
+ "[!["+title+"]("+url+")]("+href+")",
+ `<p><a href="`+href+`" rel="nofollow"><img src="`+result+`" alt="`+title+`"/></a></p>`)
}
func testAnswers(baseURLContent, baseURLImages string) []string {