diff options
author | L.E.R <LER0ever@users.noreply.github.com> | 2018-10-30 17:26:28 -0500 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-10-30 18:26:28 -0400 |
commit | b686bd0c9467885308a8e45214e75ee270c084e2 (patch) | |
tree | 1a7fea87e2c1faa374288aa79e5ccbcc245e42a0 /modules/markup/markdown/markdown_test.go | |
parent | 10370651fcd14b61524e1dd1ca941af640916814 (diff) | |
download | gitea-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.go | 4 |
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 { |