aboutsummaryrefslogtreecommitdiffstats
path: root/modules/markdown/markdown_test.go
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-05-05 11:49:13 +0300
committerLunny Xiao <xiaolunwen@gmail.com>2017-05-05 16:49:13 +0800
commit9a0b0da1fe1a32b8ff5cc09f97687395fec2ed57 (patch)
treed68e7c45dacdca5add1d653c38d180d35e954633 /modules/markdown/markdown_test.go
parent2e17dda8bb583d2a088589ca4d37ce2d4131b0e7 (diff)
downloadgitea-9a0b0da1fe1a32b8ff5cc09f97687395fec2ed57.tar.gz
gitea-9a0b0da1fe1a32b8ff5cc09f97687395fec2ed57.zip
Fix commit sha1 URL rendering in markdown (#1677)
* Fix commit sha1 URL rendering in markdown * Add unit test for commit sha1 markdown rendering when sha1 has space before it * Change to better variable name
Diffstat (limited to 'modules/markdown/markdown_test.go')
-rw-r--r--modules/markdown/markdown_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/markdown/markdown_test.go b/modules/markdown/markdown_test.go
index 8364146573..e6bc3683c6 100644
--- a/modules/markdown/markdown_test.go
+++ b/modules/markdown/markdown_test.go
@@ -296,6 +296,7 @@ func TestRender_Commits(t *testing.T) {
test(sha, `<p><a href="`+commit+`" rel="nofollow">b6dd6210ea</a></p>`)
test(commit, `<p><a href="`+commit+`" rel="nofollow">b6dd6210ea</a></p>`)
test(tree, `<p><a href="`+src+`" rel="nofollow">b6dd6210ea/src</a></p>`)
+ test("commit "+sha, `<p>commit <a href="`+commit+`" rel="nofollow">b6dd6210ea</a></p>`)
}
func TestRender_Images(t *testing.T) {