Backport #32980 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
parent
ad1b76540e
commit
a0b65ed17f
5 changed files with 40 additions and 17 deletions
|
@ -206,6 +206,16 @@ func TestRender_links(t *testing.T) {
|
|||
test(
|
||||
"ftps://gitea.com",
|
||||
`<p>ftps://gitea.com</p>`)
|
||||
|
||||
t.Run("LinkSplit", func(t *testing.T) {
|
||||
input, _ := util.SplitStringAtByteN("http://10.1.2.3", 12)
|
||||
assert.Equal(t, "http://10…", input)
|
||||
test(input, "<p>http://10…</p>")
|
||||
|
||||
input, _ = util.SplitStringAtByteN("http://10.1.2.3", 13)
|
||||
assert.Equal(t, "http://10.…", input)
|
||||
test(input, "<p>http://10.…</p>")
|
||||
})
|
||||
}
|
||||
|
||||
func TestRender_email(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue